Skip to content

Commit

Permalink
Merge pull request #858 from near/dev
Browse files Browse the repository at this point in the history
v8.2.1 Release (dev -> main)
  • Loading branch information
DamirSQA authored Jul 21, 2023
2 parents 196a235 + 39135fb commit e2533dc
Show file tree
Hide file tree
Showing 30 changed files with 217 additions and 261 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: "16.x"
cache: 'yarn'
- name: Check example apps
run: echo "EXAMPLE_APPS=$(ls ./examples | tr '\n' ',')" >> $GITHUB_ENV
run: echo "EXAMPLE_APPS=$(ls ./examples | tr '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV

- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
Expand Down
2 changes: 1 addition & 1 deletion examples/angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
}
},
"deploy": {
"executor": "@nx/workspace:run-script",
"executor": "nx:run-script",
"options": {
"script": "gh-pages -d ./dist/examples/angular"
}
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "8.2.0",
"version": "8.2.1",
"description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem",
"keywords": [
"near",
Expand Down Expand Up @@ -85,13 +85,13 @@
"@angular/router": "15.2.9",
"@here-wallet/core": "^1.4.3",
"@jscutlery/semver": "^2.30.1",
"@ledgerhq/hw-transport": "6.27.1",
"@ledgerhq/hw-transport-webhid": "6.27.1",
"@ledgerhq/hw-transport": "6.28.5",
"@ledgerhq/hw-transport-webhid": "6.27.16",
"@metamask/detect-provider": "^2.0.0",
"@meteorwallet/sdk": "^0.8.0",
"@nightlylabs/connect-near": "0.0.15",
"@walletconnect/sign-client": "2.7.8",
"@web3modal/standalone": "^2.2.2",
"@walletconnect/sign-client": "2.8.6",
"@walletconnect/modal": "^2.6.0",
"better-sqlite3": "^8.4.0",
"big.js": "^6.1.1",
"bn.js": "^5.2.0",
Expand All @@ -115,7 +115,7 @@
"rxjs": "^7.8.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tslib": "^2.5.2",
"tslib": "^2.6.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"url": "^0.11.0",
Expand All @@ -136,6 +136,7 @@
"@nrwl/rollup": "16.0.0",
"@nrwl/tao": "16.0.0",
"@nrwl/webpack": "16.0.0",
"@nx/angular": "16.0.0",
"@nx/cypress": "16.0.0",
"@nx/eslint-plugin": "16.0.0",
"@nx/jest": "16.0.0",
Expand All @@ -159,7 +160,7 @@
"@types/gh-pages": "^3.2.1",
"@types/jest": "29.4.4",
"@types/node": "18.11.9",
"@types/qrcode": "^1.5.0",
"@types/qrcode": "^1.5.1",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@types/regenerator-runtime": "^0.13.1",
Expand All @@ -168,7 +169,7 @@
"@types/w3c-web-usb": "^1.0.5",
"@typescript-eslint/eslint-plugin": "5.58.0",
"@typescript-eslint/parser": "5.58.0",
"@walletconnect/types": "^2.7.8",
"@walletconnect/types": "2.8.6",
"babel-jest": "29.4.3",
"css-loader": "^6.4.0",
"cypress": "^9.1.0",
Expand Down Expand Up @@ -204,7 +205,6 @@
"url-loader": "^4.1.1",
"uuid": "^9.0.0",
"webpack": "^5.75.0",
"webpack-merge": "^5.8.0",
"@nx/angular": "16.0.0"
"webpack-merge": "^5.8.0"
}
}
2 changes: 1 addition & 1 deletion packages/account-export/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/account-export",
"version": "8.2.0",
"version": "8.2.1",
"description": "This is the Export Selector UI package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/coin98-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/coin98-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Coin 98 wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/core",
"version": "8.2.0",
"version": "8.2.1",
"description": "This is the core package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/default-wallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/default-wallets",
"version": "8.2.0",
"version": "8.2.1",
"description": "Default wallets package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/finer-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/finer-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "FiNER Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/here-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/here-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Here wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/ledger",
"version": "8.2.0",
"version": "8.2.1",
"description": "Ledger package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/math-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/math-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Math wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/meteor-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/meteor-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Meteor wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/modal-ui-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/modal-ui-js",
"version": "8.2.0",
"version": "8.2.1",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/modal-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/modal-ui",
"version": "8.2.0",
"version": "8.2.1",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/my-near-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/my-near-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "My Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/narwallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/narwallets",
"version": "8.2.0",
"version": "8.2.1",
"description": "This is the Narwallets package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/near-snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/near-snap",
"version": "8.2.0",
"version": "8.2.1",
"description": "Metamask snap to interact with Near dapps.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/near-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/near-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/nearfi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nearfi",
"version": "8.2.0",
"version": "8.2.1",
"description": "Nearfi package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/neth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/neth",
"version": "8.2.0",
"version": "8.2.1",
"description": "Control NEAR accounts with ETH accounts",
"author": "mattlockyer",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/nightly-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nightly-connect",
"version": "8.2.0",
"version": "8.2.1",
"description": "Nightly connect package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/nightly/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nightly",
"version": "8.2.0",
"version": "8.2.1",
"description": "Nightly wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/opto-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/opto-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Opto wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/sender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/sender",
"version": "8.2.0",
"version": "8.2.1",
"description": "Sender wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/wallet-connect",
"version": "8.2.0",
"version": "8.2.1",
"description": "Wallet Connect package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
22 changes: 15 additions & 7 deletions packages/wallet-connect/src/lib/wallet-connect-client.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import Client from "@walletconnect/sign-client";
import type { SignClientTypes, EngineTypes } from "@walletconnect/types";
import { Web3Modal } from "@web3modal/standalone";
import { WalletConnectModal } from "@walletconnect/modal";
import type { SessionTypes } from "@walletconnect/types";
import type {
EventEmitterService,
WalletEvents,
} from "@near-wallet-selector/core";

// NEAR supported WalletIds from WalletConnect Explorer.
const OPTO_WALLET =
"9504a1c1a86cc0702b2d3e47049e1389b373fb2ff22de3208c748d62912433a4";

class WalletConnectClient {
private client: Client;
private emitter: EventEmitterService<WalletEvents>;
Expand Down Expand Up @@ -47,10 +51,11 @@ class WalletConnectClient {
projectId: string,
chainId: string
) {
const web3Modal = new Web3Modal({
walletConnectVersion: 2,
const walletConnectModal = new WalletConnectModal({
projectId,
standaloneChains: [chainId],
chains: [chainId],
explorerExcludedWalletIds: "ALL",
explorerRecommendedWalletIds: [OPTO_WALLET],
});

return new Promise<SessionTypes.Struct>((resolve, reject) => {
Expand All @@ -59,8 +64,11 @@ class WalletConnectClient {
.then(({ uri, approval }) => {
if (uri) {
if (qrCodeModal) {
web3Modal.openModal({ uri, standaloneChains: [chainId] });
web3Modal.subscribeModal(({ open }) => {
walletConnectModal.openModal({
uri,
standaloneChains: [chainId],
});
walletConnectModal.subscribeModal(({ open }) => {
if (!open) {
reject(new Error("User cancelled pairing"));
}
Expand All @@ -73,7 +81,7 @@ class WalletConnectClient {
approval()
.then(resolve)
.catch(reject)
.finally(() => web3Modal.closeModal());
.finally(() => walletConnectModal.closeModal());
})
.catch(reject);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/wallet-utils",
"version": "8.2.0",
"version": "8.2.1",
"description": "Wallet utils package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/welldone-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/welldone-wallet",
"version": "8.2.0",
"version": "8.2.1",
"description": "Welldone wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/xdefi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/xdefi",
"version": "8.2.0",
"version": "8.2.1",
"description": "This is the XDEFI package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
Loading

0 comments on commit e2533dc

Please sign in to comment.