diff --git a/docs/package.json b/docs/package.json index 3af7f13fb..b63002249 100644 --- a/docs/package.json +++ b/docs/package.json @@ -76,7 +76,7 @@ "@web3-onboard/trezor": "^2.3.4", "@web3-onboard/trust": "^2.0.1", "@web3-onboard/uauth": "^2.0.2", - "@web3-onboard/walletconnect": "^2.3.3", + "@web3-onboard/walletconnect": "^2.3.4-alpha.1", "@web3-onboard/web3auth": "^2.2.0", "@web3-onboard/xdefi": "^2.0.1", "animejs": "^3.2.1", diff --git a/docs/src/routes/docs/[...4]wallets/walletconnect.md b/docs/src/routes/docs/[...4]wallets/walletconnect.md index fee5c41c2..3ee0990f7 100644 --- a/docs/src/routes/docs/[...4]wallets/walletconnect.md +++ b/docs/src/routes/docs/[...4]wallets/walletconnect.md @@ -62,6 +62,10 @@ type WalletConnectOptions = { * optional chains for the WalletConnect module */ requiredChains?: number[] | undefined + /** + * `undefined` by default, see https://docs.walletconnect.com/2.0/web3modal/options + */ + qrModalOptions?: Web3ModalConfig } ) ``` diff --git a/packages/demo/package.json b/packages/demo/package.json index 21eb730b0..2559e537d 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -23,7 +23,7 @@ "webpack-dev-server": "4.7.4" }, "dependencies": { - "@web3-onboard/core": "^2.16.0", + "@web3-onboard/core": "^2.16.1-alpha.1", "@web3-onboard/coinbase": "^2.2.1", "@web3-onboard/transaction-preview": "^2.0.5", "@web3-onboard/dcent": "^2.2.4", @@ -45,7 +45,7 @@ "@web3-onboard/torus": "^2.2.2", "@web3-onboard/taho": "^2.0.1", "@web3-onboard/web3auth": "^2.2.0", - "@web3-onboard/walletconnect": "^2.3.3", + "@web3-onboard/walletconnect": "^2.3.4-alpha.1", "@web3-onboard/enkrypt": "^2.0.1", "@web3-onboard/mew-wallet": "^2.0.0", "@web3-onboard/xdefi": "^2.0.1", diff --git a/packages/walletconnect/README.md b/packages/walletconnect/README.md index 0a9cb0f03..dd5af1541 100644 --- a/packages/walletconnect/README.md +++ b/packages/walletconnect/README.md @@ -47,6 +47,10 @@ type WalletConnectOptions = { * optional chains for the WalletConnect module */ requiredChains?: number[] | undefined + /** + * `undefined` by default, see https://docs.walletconnect.com/2.0/web3modal/options + */ + qrModalOptions?: Web3ModalConfig } ) ``` diff --git a/packages/walletconnect/package.json b/packages/walletconnect/package.json index 7f1c0e2ac..7e350d325 100644 --- a/packages/walletconnect/package.json +++ b/packages/walletconnect/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/walletconnect", - "version": "2.3.3", + "version": "2.3.4-alpha.1", "description": "WalletConnect SDK module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -56,11 +56,12 @@ "license": "MIT", "devDependencies": { "typescript": "^4.5.5", - "@walletconnect/types": "^2.3.3" + "@walletconnect/types": "^2.5.2", + "@web3modal/standalone": "^2.2.2" }, "dependencies": { "@ethersproject/providers": "^5.5.0", - "@walletconnect/ethereum-provider": "2.4.10", + "@walletconnect/ethereum-provider": "2.5.2", "@walletconnect/client": "^1.8.0", "@walletconnect/qrcode-modal": "^1.8.0", "@web3-onboard/common": "^2.3.0", diff --git a/packages/walletconnect/src/index.ts b/packages/walletconnect/src/index.ts index 56066ef9c..3a225721f 100644 --- a/packages/walletconnect/src/index.ts +++ b/packages/walletconnect/src/index.ts @@ -1,4 +1,5 @@ import type { WalletInit } from '@web3-onboard/common' +import type { Web3ModalConfig } from '@web3modal/standalone' import v1 from './v1.js' import v2 from './v2.js' @@ -11,8 +12,7 @@ export type WalletConnectOptions = { bridge?: string qrcodeModalOptions?: { mobileLinks: string[] - }, - + } } & ( | { /** @@ -36,6 +36,10 @@ export type WalletConnectOptions = { * optional chains for the WalletConnect module */ requiredChains?: number[] | undefined + /** + * `undefined` by default, see https://docs.walletconnect.com/2.0/web3modal/options + */ + qrModalOptions?: Web3ModalConfig } ) @@ -48,7 +52,7 @@ export const isHexString = (value: string | number) => { } function walletConnect(options?: WalletConnectOptions): WalletInit { - const version = options && options.version || 1 + const version = (options && options.version) || 1 return version === 1 ? v1(options) : v2(options) } diff --git a/packages/walletconnect/src/v2.ts b/packages/walletconnect/src/v2.ts index 6fe602539..bffcab7b6 100644 --- a/packages/walletconnect/src/v2.ts +++ b/packages/walletconnect/src/v2.ts @@ -1,4 +1,5 @@ import type { CoreTypes } from '@walletconnect/types' +import type { EthereumProvider } from '@walletconnect/ethereum-provider' import type { Chain, ProviderAccounts, @@ -19,13 +20,12 @@ const methods = [ ] function walletConnect(options?: WalletConnectOptions): WalletInit { - const projectId = - options && options.version === 2 ? options.projectId : undefined - if (!projectId) { + if (!options || options.version !== 2) { throw new Error( 'WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.' ) } + const { projectId, handleUri, requiredChains, qrModalOptions } = options return () => { return { @@ -65,21 +65,20 @@ function walletConnect(options?: WalletConnectOptions): WalletInit { } // default to mainnet - const requiredChains = - options && - options.version === 2 && - Array.isArray(options.requiredChains) && - options.requiredChains.length && - options.requiredChains.every(num => !isNaN(num) ) - // @ts-ignore + const requiredChainsParsed = + Array.isArray(requiredChains) && + requiredChains.length && + requiredChains.every(num => !isNaN(num)) + ? // @ts-ignore // Required as WC package does not support hex numbers - ? options.requiredChains.map(chainID => parseInt(chainID)) + requiredChains.map(chainID => parseInt(chainID)) : [1] const connector = await EthereumProvider.init({ projectId, + chains: requiredChainsParsed, // default to mainnet metadata: getMetaData(), - chains: requiredChains, // default to mainnet + showQrModal: true, optionalChains: chains.map(({ id }) => parseInt(id, 16)), optionalMethods: methods, rpcMap: chains @@ -87,7 +86,8 @@ function walletConnect(options?: WalletConnectOptions): WalletInit { .reduce((rpcMap: Record, { id, rpcUrl }) => { rpcMap[parseInt(id, 16)] = rpcUrl || '' return rpcMap - }, {}) + }, {}), + qrModalOptions: qrModalOptions }) const emitter = new EventEmitter() @@ -163,7 +163,7 @@ function walletConnect(options?: WalletConnectOptions): WalletInit { if (this.connector.session) this.connector.disconnect() } - if (options && options.handleUri) { + if (options && handleUri) { // listen for uri event fromEvent( this.connector as JQueryStyleEventEmitter, @@ -173,20 +173,21 @@ function walletConnect(options?: WalletConnectOptions): WalletInit { .pipe(takeUntil(this.disconnected$)) .subscribe(async uri => { try { - options.handleUri && (await options.handleUri(uri)) + handleUri && (await handleUri(uri)) } catch (error) { throw `An error occurred when handling the URI. Error: ${error}` } }) } - ;(() => { + const checkForSession = () => { const session = this.connector.session if (session) { this.emit('accountsChanged', this.connector.accounts) this.emit('chainChanged', this.connector.chainId) } - })() + } + checkForSession() this.request = async ({ method, params }) => { if (method === 'eth_chainId') { @@ -196,50 +197,52 @@ function walletConnect(options?: WalletConnectOptions): WalletInit { } if (method === 'eth_requestAccounts') { - return new Promise((resolve, reject) => { - // Check if connection is already established - if (!this.connector.session) { - // create new session - this.connector.connect().catch(err => { - console.error('err: ', err) - reject( - new ProviderRpcError({ - code: 4001, - message: 'User rejected the request.' - }) - ) - }) - } else { - // update ethereum provider to load accounts & chainId - const accounts = this.connector.accounts - const chainId = this.connector.chainId - const hexChainId = `0x${chainId.toString(16)}` - this.emit('chainChanged', hexChainId) - return resolve(accounts) + return new Promise( + async (resolve, reject) => { + // Subscribe to connection events + fromEvent( + this.connector as JQueryStyleEventEmitter< + any, + { chainId: number } + >, + 'connect', + (payload: { chainId: number | string }) => payload + ) + .pipe(take(1)) + .subscribe({ + next: ({ chainId }) => { + this.emit('accountsChanged', this.connector.accounts) + const hexChainId = isHexString(chainId) + ? chainId + : `0x${chainId.toString(16)}` + this.emit('chainChanged', hexChainId) + resolve(this.connector.accounts) + }, + error: reject + }) + + // Check if connection is already established + if (!this.connector.session) { + // create new session + await this.connector.connect().catch(err => { + console.error('err creating new session: ', err) + reject( + new ProviderRpcError({ + code: 4001, + message: 'User rejected the request.' + }) + ) + }) + } else { + // update ethereum provider to load accounts & chainId + const accounts = this.connector.accounts + const chainId = this.connector.chainId + const hexChainId = `0x${chainId.toString(16)}` + this.emit('chainChanged', hexChainId) + return resolve(accounts) + } } - // Subscribe to connection events - fromEvent( - this.connector as JQueryStyleEventEmitter< - any, - { accounts: string[]; chainId: number } - >, - 'connect', - (payload: { accounts: string[]; chainId: number }) => - payload - ) - .pipe(take(1)) - .subscribe({ - next: ({ accounts, chainId }) => { - this.emit('accountsChanged', accounts) - const hexChainId = isHexString(chainId) - ? chainId - : `0x${chainId.toString(16)}` - this.emit('chainChanged', hexChainId) - resolve(accounts) - }, - error: reject - }) - }) + ) } if (method === 'eth_selectAccounts') { diff --git a/yarn.lock b/yarn.lock index 7d4136230..5818b550a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1417,10 +1417,10 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.0.2.tgz#8554e16943f86cc2a5f6348a14dfe6e5bd0c572a" integrity sha512-TQ21IjcZOw/scqypaVFY3jHVqI7X7Hta3qN/us6FvTol3AY06UmrhhXGww0E9xHmAbdX241ddwXEiMBSQZFr9g== -"@lit-labs/ssr-dom-shim@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.0.0.tgz#427e19a2765681fd83411cd72c55ba80a01e0523" - integrity sha512-ic93MBXfApIFTrup4a70M/+ddD8xdt2zxxj9sRwHQzhS9ag/syqkD8JPdTXsc1gUy2K8TTirhlCqyTEM/sifNw== +"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.0.tgz#3361d6b8c4cb2ac426d5794ac7cd9776cd2f0814" + integrity sha512-92uQ5ARf7UXYrzaFcAX3T2rTvaS9Z1//ukV+DqjACM4c8s0ZBQd7ayJU5Dh2AFLD/Ayuyz4uMmxQec8q3U4Ong== "@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": version "1.6.1" @@ -2628,9 +2628,9 @@ "@types/node" "*" "@types/trusted-types@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756" - integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.3.tgz#a136f83b0758698df454e328759dbd3d44555311" + integrity sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g== "@types/use-sync-external-store@^0.0.3": version "0.0.3" @@ -2927,13 +2927,13 @@ "@walletconnect/types" "^1.8.0" "@walletconnect/utils" "^1.8.0" -"@walletconnect/core@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.4.10.tgz#8975996b5c47d0d11a1187b3793215678c3ea3af" - integrity sha512-3ZVS07NS9+zG+Mw4MOxYhoJHwCSuIOrq+HuhaTLZZ+NswscZ+GwguF2fTsRNgk4jXkMJodaqUFxfPJeCVVcwHQ== +"@walletconnect/core@2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.5.2.tgz#999605a62a3b37867d2559e40b62778534eb787c" + integrity sha512-R0D9NKgHBpdun65q+1L49GOIGDLaIodnyb+Dq0tXGVzvXzy2lkXOlh2e9am61ixaVrUsHt7b96b318geqsuk4Q== dependencies: "@walletconnect/heartbeat" "1.2.0" - "@walletconnect/jsonrpc-provider" "1.0.9" + "@walletconnect/jsonrpc-provider" "1.0.10" "@walletconnect/jsonrpc-utils" "^1.0.4" "@walletconnect/jsonrpc-ws-connection" "1.0.10" "@walletconnect/keyvaluestorage" "^1.0.2" @@ -2942,8 +2942,8 @@ "@walletconnect/relay-auth" "^1.0.4" "@walletconnect/safe-json" "^1.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.4.10" - "@walletconnect/utils" "2.4.10" + "@walletconnect/types" "2.5.2" + "@walletconnect/utils" "2.5.2" events "^3.3.0" lodash.isequal "4.5.0" pino "7.11.0" @@ -3017,20 +3017,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.4.10.tgz#450167cf3fbfb7813189076f13c0c61e324f8c25" - integrity sha512-anD3inbmuIZgWJ7Km5QP6L/hjI8sK/3Q4WA+g8OlyHS2cqO9sPjYdbPUVnzVgwhTDbNDJr2AUNXmvpm2R0hq5Q== +"@walletconnect/ethereum-provider@2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.5.2.tgz#b70c01fc281ae8b6c424fc063bc48b476ef3f83a" + integrity sha512-WEN85tsuHgvoiMK4KpsRsOgsKB0QLCctSwxTqyWDybBbXuJRJGWXkZ6Oma9VSmUR0MgPSjiGmOFgY4ybMlhEMA== dependencies: "@walletconnect/jsonrpc-http-connection" "^1.0.4" "@walletconnect/jsonrpc-provider" "^1.0.6" "@walletconnect/jsonrpc-types" "^1.0.2" "@walletconnect/jsonrpc-utils" "^1.0.4" - "@walletconnect/sign-client" "2.4.10" - "@walletconnect/types" "2.4.10" - "@walletconnect/universal-provider" "2.4.10" - "@walletconnect/utils" "2.4.10" - "@web3modal/standalone" "^2.2.0" + "@walletconnect/sign-client" "2.5.2" + "@walletconnect/types" "2.5.2" + "@walletconnect/universal-provider" "2.5.2" + "@walletconnect/utils" "2.5.2" events "^3.3.0" "@walletconnect/events@^1.0.1": @@ -3081,10 +3080,10 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.9.tgz#ce5ab64dce6a739110aef204ffeedd668ad343d8" - integrity sha512-8CwmiDW42F+F8Qct13lX2x4lJOsi0mNBtUln3VS6TpWioTaL1VfforC/8ULc3tHXv+SNWwAXn2lCZbDcYhdRcA== +"@walletconnect/jsonrpc-provider@1.0.10": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.10.tgz#8351a06b70faa8f8c0e77dc2c6d9b0190d17d407" + integrity sha512-g0ffPSpY3P6GqGjWGHsr3yqvQUhj7q2k6pAikoXv5XTXWaJRzFvrlbFkSgxziXsBrwrMZn0qvPufvpN4mMZ5FA== dependencies: "@walletconnect/jsonrpc-utils" "^1.0.6" "@walletconnect/safe-json" "^1.0.1" @@ -3253,19 +3252,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.4.10.tgz#727072fcbf0c1f84c5370155f0feb7e711733ca4" - integrity sha512-8yNpRUVvkoFY5sdj7QbW1+g6QWgP8VLy1xVAqWkjLIiPieMA6IQcOpaEih9Bbq55oTOxjeWO9+E+V8/0bNXVvQ== +"@walletconnect/sign-client@2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.5.2.tgz#d05df9dce271720fdb75741fb162dcc899e39029" + integrity sha512-eKUnGCVgYqN+6b4gm27ML/064m0c/2hTlTHy6tbUszYtEPTzb+q4fvpnWs6blaOjzc18l8NFwX3c1+MHxVdQUQ== dependencies: - "@walletconnect/core" "2.4.10" + "@walletconnect/core" "2.5.2" "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.0" "@walletconnect/jsonrpc-utils" "^1.0.4" "@walletconnect/logger" "^2.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.4.10" - "@walletconnect/utils" "2.4.10" + "@walletconnect/types" "2.5.2" + "@walletconnect/utils" "2.5.2" events "^3.3.0" pino "7.11.0" @@ -3294,10 +3293,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.4.10.tgz#7f85a761b9d65e192d2f510ce858383f19a340f7" - integrity sha512-AvT3ynXXDXty94SadbjGrqqQA8vB1g9AchHZOakCY/Cfo5etpUFG3PfubWMC1FKe2FPk020nLkc2ghjNxHGGtw== +"@walletconnect/types@2.5.1", "@walletconnect/types@^2.4.10": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.5.1.tgz#1bb7d51a6cf04233a70c38efea0aa414db5768f9" + integrity sha512-PctuQw1Kt0tJ8mYU8p1JOXYxv8PhvNoXXtLaGkGZ/9knn1dJaQRlMDEN0iHG6qXlSAo0tW8Q3PtK5tetf5dJ0g== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.0" @@ -3306,10 +3305,10 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/types@2.5.1", "@walletconnect/types@^2.4.10": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.5.1.tgz#1bb7d51a6cf04233a70c38efea0aa414db5768f9" - integrity sha512-PctuQw1Kt0tJ8mYU8p1JOXYxv8PhvNoXXtLaGkGZ/9knn1dJaQRlMDEN0iHG6qXlSAo0tW8Q3PtK5tetf5dJ0g== +"@walletconnect/types@2.5.2", "@walletconnect/types@^2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.5.2.tgz#b2ad73f9e6e19a90fe372babc9ed461fe27098fe" + integrity sha512-VnV43qs4f2hwv6wGQ9ZSE+smP0z2oVy2XaVO5Szd2fmOx9bB+ov+sQzh9xeoQ+DhjNrbJhUaecW/peE6CPPSag== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.0" @@ -3328,39 +3327,27 @@ resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.8.0.tgz#3f5e85b2d6b149337f727ab8a71b8471d8d9a195" integrity sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg== -"@walletconnect/types@^2.3.3": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.4.0.tgz#fc4f9a315104558669b9345f1411b338aa99e6d6" - integrity sha512-hUdvwte7jnycq+B4Wa9czWraH3fDilbzr2/uziQTs61hiafoP7BkS+OrMymeb4HGmo+I2YOgVlc8ngVtdAxOSQ== - dependencies: - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.0" - "@walletconnect/jsonrpc-types" "^1.0.2" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - events "^3.3.0" - -"@walletconnect/universal-provider@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.4.10.tgz#24696a2b9267d18a8a84008c5b42c8d5b917e4f0" - integrity sha512-KbRl3ivDGXtycp1qs/p8RvXz0f8VgG8k+NKpD6x9/ibnuuFLRt6UgriLHHCslJ9SSGuGHAeIaWs+kRRDKDNFXQ== +"@walletconnect/universal-provider@2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.5.2.tgz#f0ec21be16cde5c42f2dc87630add01d2e01acbb" + integrity sha512-R61VL02zvcljwSC+FJVzxGswbN21tokQLG0IQL1tVq30+KfkZOt0y/UxsDNvgHNGleGgfoQZzOWsfSLgp5pcBQ== dependencies: "@walletconnect/jsonrpc-http-connection" "^1.0.4" "@walletconnect/jsonrpc-provider" "^1.0.6" "@walletconnect/jsonrpc-types" "^1.0.2" "@walletconnect/jsonrpc-utils" "^1.0.4" "@walletconnect/logger" "^2.0.1" - "@walletconnect/sign-client" "2.4.10" - "@walletconnect/types" "2.4.10" - "@walletconnect/utils" "2.4.10" + "@walletconnect/sign-client" "2.5.2" + "@walletconnect/types" "2.5.2" + "@walletconnect/utils" "2.5.2" eip1193-provider "1.0.1" events "^3.3.0" pino "7.11.0" -"@walletconnect/utils@2.4.10": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.4.10.tgz#1fbae7973008c06209ccf79797f732e44e97ac1c" - integrity sha512-mg01uaGY+DoT5yMVb7eL9zXdXZLRfkz85b63URa6QyfWD0Jbstmviutc5NU2YzzbIuekT3miL4cwPvi0MRklWA== +"@walletconnect/utils@2.5.2": + version "2.5.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.5.2.tgz#2ee0a10ea646f3e33e192de4b087a846e03b839f" + integrity sha512-s5bpY5q/RaXMc6LgPp+E7qPbKhrff9TjrLRjN2m9COnt9cERowpQEFrPzWmh10FatRZ7dNrudJ5I/c36nFc+hw== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" @@ -3371,7 +3358,7 @@ "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.4.10" + "@walletconnect/types" "2.5.2" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" @@ -3452,6 +3439,26 @@ "@walletconnect/window-getters" "^1.0.1" tslib "1.14.1" +"@web3-onboard/core@^2.16.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.16.0.tgz#4eabdf66c66763bc6eeaabc97f2ea1c3639984eb" + integrity sha512-VyDK4qYo18zXTl/6mEFtGknRVtP4M4u+o99xJJLXCBr1eT49SUQhTrVUqTJ1lO5nA/j67qyPGojnf7dL/tAUiA== + dependencies: + "@unstoppabledomains/resolution" "^8.0" + "@web3-onboard/common" "^2.3.0" + bignumber.js "^9.0.0" + bnc-sdk "^4.6.7" + bowser "^2.11.0" + ethers "5.5.3" + eventemitter3 "^4.0.7" + joi "17.8.1" + lodash.merge "^4.6.2" + lodash.partition "^4.6.0" + nanoid "^4.0.0" + rxjs "^7.5.5" + svelte "^3.49.0" + svelte-i18n "^3.3.13" + "@web3-react/abstract-connector@^6.0.7": version "6.0.7" resolved "https://registry.yarnpkg.com/@web3-react/abstract-connector/-/abstract-connector-6.0.7.tgz#401b3c045f1e0fab04256311be49d5144e9badc6" @@ -3652,28 +3659,28 @@ "@web3auth/base-evm-adapter" "^5.0.1" "@web3auth/ethereum-provider" "^5.0.1" -"@web3modal/core@2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-2.2.0.tgz#847459e1ab1766f312c39715270a7ca0fe831666" - integrity sha512-Kafg/KtK6S9x0Ofcaq9hj7dRK5/541nM+LnayPmHxx4fSrDgcM9YYhL12fI4BG1xGOJwkeZjgFOtS0qf123Cjw== +"@web3modal/core@2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-2.2.2.tgz#1e282dc45bddb11c04f1c93abce570bac1b9a620" + integrity sha512-RKbYNIEVP5Hwiva68PWXExbkTFLUTasneyRpcjoQSM4BIh78qXp1YMt0nyTvFdHmHQEGxXEMCuRG5qoE97uMHA== dependencies: buffer "6.0.3" - valtio "1.9.0" + valtio "1.10.3" -"@web3modal/standalone@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@web3modal/standalone/-/standalone-2.2.0.tgz#9f81ed976dd16bd795f902503065f75c9160eab3" - integrity sha512-cLFW4VamSJ7L4sM5OGmr1SHK3FgyLUMEaacvHsCA3XSvUF0LxbMC+N4uBsONrW4c0JyIjTdeii1GqG4B3jwn7Q== +"@web3modal/standalone@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@web3modal/standalone/-/standalone-2.2.2.tgz#2d5ce74bbb7f112b31da32049620afa75c4a4686" + integrity sha512-c05kkTFNGZqnjJ3n2C8uo+wWL6ut1jexGYAyTvbweDengdsOr8LDo0VpK5V3XSKCV2fFcPh5JE9H1aA4jpnZPg== dependencies: - "@web3modal/core" "2.2.0" - "@web3modal/ui" "2.2.0" + "@web3modal/core" "2.2.2" + "@web3modal/ui" "2.2.2" -"@web3modal/ui@2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-2.2.0.tgz#2837da46706f1a3fcdf2f2c22e7ed029e235a3ab" - integrity sha512-jcV5C9AuMdsFdf6Ljsr0v2lInu8FJJyXcZPaMHkgYNIczzgMEpDE+UOA7hLnyCTUxM9R0AgRcgfTyMWb9H8Ssw== +"@web3modal/ui@2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-2.2.2.tgz#f1c1ac908230d4214c35891a5d922c118353eaf2" + integrity sha512-PAuMOuk4sZ4UGjucGMZKzu6Qu56XtFsgLaqOn8ZgP2RkZmYEBGSG9mUQVzJd3XzfzAy1T91Wmqp/3TI3m0pXuQ== dependencies: - "@web3modal/core" "2.2.0" + "@web3modal/core" "2.2.2" lit "2.6.1" motion "10.15.5" qrcode "1.5.1" @@ -8223,17 +8230,18 @@ lie@3.1.1: immediate "~3.0.5" lit-element@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.2.2.tgz#d148ab6bf4c53a33f707a5168e087725499e5f2b" - integrity sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ== + version "3.3.0" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.0.tgz#a8e0b9ca5239faf721d9af4460f106cf7f03533b" + integrity sha512-M3OIoblNS7LZdRxOIk8g0wyLEA/lRw/UGJ1TX+767OpkuDsRdSoxBIvewpWqCo7sMd9xt1XedUNZIr9jUO1X3g== dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.0" "@lit/reactive-element" "^1.3.0" - lit-html "^2.2.0" + lit-html "^2.7.0" -lit-html@^2.2.0, lit-html@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.6.1.tgz#eb29f0b0c2ab54ea77379db11fc011b0c71f1cda" - integrity sha512-Z3iw+E+3KKFn9t2YKNjsXNEu/LRLI98mtH/C6lnFg7kvaqPIzPn124Yd4eT/43lyqrejpc5Wb6BHq3fdv4S8Rw== +lit-html@^2.6.0, lit-html@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.7.0.tgz#b244457d0f8c4782a50e83b2c6f3611347ef775d" + integrity sha512-/zPOl8EfeB3HHpTzINSpnWgvgQ8N07g/j272EOAIyB0Ys2RzBqTVT23i+JZuUlNbB2WHHeSsTCFi92NtWrtpqQ== dependencies: "@types/trusted-types" "^2.0.2" @@ -9595,10 +9603,10 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-compare@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.4.0.tgz#90f6abffe734ef86d8e37428c5026268606a9c1b" - integrity sha512-FD8KmQUQD6Mfpd0hywCOzcon/dbkFP8XBd9F1ycbKtvVsfv6TsFUKJ2eC0Iz2y+KzlkdT1Z8SY6ZSgm07zOyqg== +proxy-compare@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.5.0.tgz#0387c5e4d283ba9b1c0353bb20def4449b06bbd2" + integrity sha512-f1us0OsVAJ3tdIMXGQx2lmseYS4YXe4W+sKF5g5ww/jV+5ogMadPt+sIZ+88Ga9kvMJsrRNWzCrKPpr6pMWYbA== prr@~1.0.1: version "1.0.1" @@ -11603,12 +11611,12 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -valtio@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.9.0.tgz#d5d9f664319eaf18dd98f758d50495eca28eb0b8" - integrity sha512-mQLFsAlKbYascZygFQh6lXuDjU5WHLoeZ8He4HqMnWfasM96V6rDbeFkw1XeG54xycmDonr/Jb4xgviHtuySrA== +valtio@1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.10.3.tgz#273eda9ba6459869798b4f58c84514e18fb80ed8" + integrity sha512-t3Ez/+baJ+Z5tIyeaI6nCAbW/hrmcq2jditwg/X++o5IvCdiGirQKTOv1kJq0glgUo13v5oABCVGcinggBfiKw== dependencies: - proxy-compare "2.4.0" + proxy-compare "2.5.0" use-sync-external-store "1.2.0" varint@5.0.0: