diff --git a/.changeset/lemon-coats-cheat.md b/.changeset/lemon-coats-cheat.md new file mode 100644 index 0000000000..3520966389 --- /dev/null +++ b/.changeset/lemon-coats-cheat.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Bumped MetaMask SDK. diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 50232d0f5f..bdad379ac4 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@coinbase/wallet-sdk": "4.2.3", - "@metamask/sdk": "0.30.1", + "@metamask/sdk": "0.31.0", "@safe-global/safe-apps-provider": "0.18.4", "@safe-global/safe-apps-sdk": "9.1.0", "@walletconnect/ethereum-provider": "2.17.0", diff --git a/packages/connectors/src/metaMask.ts b/packages/connectors/src/metaMask.ts index 26e07561b3..f4315a0f55 100644 --- a/packages/connectors/src/metaMask.ts +++ b/packages/connectors/src/metaMask.ts @@ -11,6 +11,7 @@ import { createConnector, extractRpcUrls, } from '@wagmi/core' +import type { linea, lineaSepolia, mainnet, sepolia } from '@wagmi/core/chains' import type { Compute, ExactPartial, @@ -23,7 +24,6 @@ import { type Address, type Hex, type ProviderConnectInfo, - type ProviderRpcError, ResourceUnavailableRpcError, type RpcError, SwitchChainError, @@ -308,6 +308,93 @@ export function metaMask(parameters: MetaMaskParameters = {}) { const chain = config.chains.find((x) => x.id === chainId) if (!chain) throw new SwitchChainError(new ChainNotConfiguredError()) + // Default chains cannot be added or removed + const isDefaultChain = (() => { + const metaMaskDefaultChains = [ + 1, 11_155_111, 59_144, 59_141, + ] satisfies [ + typeof mainnet.id, + typeof sepolia.id, + typeof linea.id, + typeof lineaSepolia.id, + ] + return metaMaskDefaultChains.find((x) => x === chainId) + })() + + // Avoid back and forth on mobile by using `'wallet_addEthereumChain'` for non-default chains + if (!isDefaultChain) + try { + const blockExplorerUrls = (() => { + const { default: blockExplorer, ...blockExplorers } = + chain.blockExplorers ?? {} + if (addEthereumChainParameter?.blockExplorerUrls) + return addEthereumChainParameter.blockExplorerUrls + if (blockExplorer) + return [ + blockExplorer.url, + ...Object.values(blockExplorers).map((x) => x.url), + ] + return + })() + + const rpcUrls = (() => { + if (addEthereumChainParameter?.rpcUrls?.length) + return addEthereumChainParameter.rpcUrls + return [chain.rpcUrls.default?.http[0] ?? ''] + })() + + await provider.request({ + method: 'wallet_addEthereumChain', + params: [ + { + blockExplorerUrls, + chainId: numberToHex(chainId), + chainName: addEthereumChainParameter?.chainName ?? chain.name, + iconUrls: addEthereumChainParameter?.iconUrls, + nativeCurrency: + addEthereumChainParameter?.nativeCurrency ?? + chain.nativeCurrency, + rpcUrls, + } satisfies AddEthereumChainParameter, + ], + }) + + // On mobile, there is a race condition between the result of `'wallet_addEthereumChain'` and `'eth_chainId'`. + // (`'eth_chainId'` from the MetaMask relay server). + // To avoid this, we wait for `'eth_chainId'` to return the expected chain ID with a retry loop. + let retryCount = 0 + const currentChainId = await withRetry( + async () => { + retryCount += 1 + const value = hexToNumber( + // `'eth_chainId'` is cached by the MetaMask SDK side to avoid unnecessary deeplinks + (await provider.request({ method: 'eth_chainId' })) as Hex, + ) + if (value !== chainId) { + if (retryCount === 5) return -1 + // `value` doesn't match expected `chainId`, throw to trigger retry + throw new Error('Chain ID mismatch') + } + return value + }, + { + delay: 100, + retryCount: 5, // android device encryption is slower + }, + ) + + if (currentChainId !== chainId) + throw new Error('User rejected switch after adding network.') + + return chain + } catch (err) { + const error = err as RpcError + if (error.code === UserRejectedRequestError.code) + throw new UserRejectedRequestError(error) + throw new SwitchChainError(error) + } + + // Use to `'wallet_switchEthereumChain'` for default chains try { await Promise.all([ provider @@ -338,63 +425,6 @@ export function metaMask(parameters: MetaMaskParameters = {}) { return chain } catch (err) { const error = err as RpcError - - // Indicates chain is not added to provider - if ( - error.code === 4902 || - // Unwrapping for MetaMask Mobile - // https://github.com/MetaMask/metamask-mobile/issues/2944#issuecomment-976988719 - (error as ProviderRpcError<{ originalError?: { code: number } }>) - ?.data?.originalError?.code === 4902 - ) { - try { - const { default: blockExplorer, ...blockExplorers } = - chain.blockExplorers ?? {} - let blockExplorerUrls: string[] | undefined - if (addEthereumChainParameter?.blockExplorerUrls) - blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls - else if (blockExplorer) - blockExplorerUrls = [ - blockExplorer.url, - ...Object.values(blockExplorers).map((x) => x.url), - ] - - let rpcUrls: readonly string[] - if (addEthereumChainParameter?.rpcUrls?.length) - rpcUrls = addEthereumChainParameter.rpcUrls - else rpcUrls = [chain.rpcUrls.default?.http[0] ?? ''] - - const addEthereumChain = { - blockExplorerUrls, - chainId: numberToHex(chainId), - chainName: addEthereumChainParameter?.chainName ?? chain.name, - iconUrls: addEthereumChainParameter?.iconUrls, - nativeCurrency: - addEthereumChainParameter?.nativeCurrency ?? - chain.nativeCurrency, - rpcUrls, - } satisfies AddEthereumChainParameter - - await provider.request({ - method: 'wallet_addEthereumChain', - params: [addEthereumChain], - }) - - const currentChainId = hexToNumber( - // Call `'eth_chainId'` directly to guard against `this.state.chainId` (via `provider.getChainId`) being stale. - (await provider.request({ method: 'eth_chainId' })) as Hex, - ) - if (currentChainId !== chainId) - throw new UserRejectedRequestError( - new Error('User rejected switch after adding network.'), - ) - - return chain - } catch (error) { - throw new UserRejectedRequestError(error as Error) - } - } - if (error.code === UserRejectedRequestError.code) throw new UserRejectedRequestError(error) throw new SwitchChainError(error) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6de80e817..9af94f1f75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -190,8 +190,8 @@ importers: specifier: 4.2.3 version: 4.2.3 '@metamask/sdk': - specifier: 0.30.1 - version: 0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10) + specifier: 0.31.0 + version: 0.31.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': specifier: 0.18.4 version: 0.18.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4) @@ -931,6 +931,10 @@ packages: resolution: {integrity: sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + '@babel/standalone@7.24.5': resolution: {integrity: sha512-Sl8oN9bGfRlNUA2jzfzoHEZxFBDliBlwi5mPVCAWKSlBNkXXJOHpu7SDOqjF6mRoTa6GNX/1kAWG3Tr+YQ3N7A==} engines: {node: '>=6.9.0'} @@ -1121,8 +1125,8 @@ packages: search-insights: optional: true - '@ecies/ciphers@0.2.0': - resolution: {integrity: sha512-dqQk3HbyuXSdflgRMrXjEcCohKeBZQl2rm0lOcYnEC4Oue90irVMwVJ0GiM/nhjP0zzGimH8mVFF/pOzQcv+Lg==} + '@ecies/ciphers@0.2.1': + resolution: {integrity: sha512-ezMihhjW24VNK/2qQR7lH8xCQY24nk0XHF/kwJ1OuiiY5iEwQXOcKVSy47fSoHPRG8gVGXcK5SgtONDk5xMwtQ==} engines: {bun: '>=1', deno: '>=2', node: '>=16'} peerDependencies: '@noble/ciphers': ^1.0.0 @@ -1770,40 +1774,20 @@ packages: resolution: {integrity: sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw==} engines: {node: '>=12.0.0'} - '@metamask/sdk-communication-layer@0.30.0': - resolution: {integrity: sha512-q5nbdYkAf76MsZxi1l5MJEAyd8sY9jLRapC8a7x1Q1BNV4rzQeFeux/d0mJ/jTR2LAwbnLZs2rL226AM75oK4w==} + '@metamask/sdk-communication-layer@0.31.0': + resolution: {integrity: sha512-V9CxdzabDPjQVgmKGHsyU3SYt4Af27g+4DbGCx0fLoHqN/i1RBDZqs/LYbJX3ykJCANzE+llz/MolMCMrzM2RA==} peerDependencies: cross-fetch: ^4.0.0 - eciesjs: ^0.3.16 - eventemitter2: ^6.4.7 + eciesjs: '*' + eventemitter2: ^6.4.9 readable-stream: ^3.6.2 socket.io-client: ^4.5.1 - '@metamask/sdk-install-modal-web@0.30.0': - resolution: {integrity: sha512-1gT533Huja9tK3cmttvcpZirRAtWJ7vnYH+lnNRKEj2xIP335Df2cOwS+zqNC4GlRCZw7A3IsTjIzlKoxBY1uQ==} - peerDependencies: - i18next: 23.11.5 - react: ^18.2.0 - react-dom: ^18.2.0 - react-native: '*' - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - react-native: - optional: true + '@metamask/sdk-install-modal-web@0.31.0': + resolution: {integrity: sha512-nr8AZ+ccEfC3BmzTkT2wH16wOARqVrkhAFqsxYsnaozn+BAb+Hwo/GRhaIGzYgYFj/tTD3SM0UtXd6x2gzMDQw==} - '@metamask/sdk@0.30.1': - resolution: {integrity: sha512-NelEjJZsF5wVpSQELpmvXtnS9+C6HdxGQ4GB9jMRzeejphmPyKqmrIGM6XtaPrJtlpX+40AcJ2dtBQcjJVzpbQ==} - peerDependencies: - react: ^18.2.0 - react-dom: ^18.2.0 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true + '@metamask/sdk@0.31.0': + resolution: {integrity: sha512-L1TKg7NkgCJbjkJsDTC6ZEpjGdroxsFksm17eGWPmNqdPf561ujJkU3xWCUPxEvU0hI+Wz3y2GegJsNej9/jWw==} '@metamask/utils@5.0.2': resolution: {integrity: sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==} @@ -2388,6 +2372,9 @@ packages: resolution: {integrity: sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==} engines: {node: '>= 10.0.0'} + '@paulmillr/qr@0.2.1': + resolution: {integrity: sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -4535,10 +4522,9 @@ packages: easy-table@1.2.0: resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} - eciesjs@0.4.9: - resolution: {integrity: sha512-PYbXFMOKtzJMlQ+IXinjsM6p2jnQCf7/lyBKu8/ZqzJ/jyRrb+O/E64iv0ZApl/64oBDZEUIwyYp/2I3wHbAZQ==} - engines: {node: '>=16.0.0'} - deprecated: Common js require is broken. Fixed in 0.4.10 + eciesjs@0.4.12: + resolution: {integrity: sha512-DGejvMCihsRAmKRFQiL6KZDE34vWVd0gvXlykFq1aEzJy/rD65AVyAIUZKZOvgvaP9ATQRcHGEZV5DfgrgjA4w==} + engines: {bun: '>=1', deno: '>=2', node: '>=16'} editorconfig@1.0.4: resolution: {integrity: sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==} @@ -4646,10 +4632,6 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -4698,6 +4680,7 @@ packages: ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + deprecated: This library has been deprecated and usage is discouraged. ethereumjs-util@6.2.1: resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} @@ -5182,12 +5165,6 @@ packages: resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==} engines: {node: '>=18.18.0'} - i18next-browser-languagedetector@7.1.0: - resolution: {integrity: sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA==} - - i18next@23.11.5: - resolution: {integrity: sha512-41pvpVbW9rhZPk5xjCX2TPJi2861LEig/YRhUkY+1FQ2IQPS0bKUDYnEqY8XPPbB48h1uIwLnP9iiEfuSl20CA==} - iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -5245,9 +5222,6 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - invariant@2.2.4: - resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} - io-ts@1.10.4: resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} @@ -6833,16 +6807,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qr-code-styling@1.6.0-rc.1: - resolution: {integrity: sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q==} - - qrcode-generator@1.4.4: - resolution: {integrity: sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==} - - qrcode-terminal-nooctal@0.12.1: - resolution: {integrity: sha512-jy/kkD0iIMDjTucB+5T6KBsnirlhegDH47vHgrj5MejchSQmi/EAMM0xMFeePgV9CJkkAapNakpVUWYgHvtdKg==} - hasBin: true - qrcode@1.5.3: resolution: {integrity: sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==} engines: {node: '>=10.13.0'} @@ -6889,12 +6853,6 @@ packages: react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-native-webview@11.26.1: - resolution: {integrity: sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw==} - peerDependencies: - react: '*' - react-native: '*' - react-refresh@0.14.0: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} engines: {node: '>=0.10.0'} @@ -7606,6 +7564,9 @@ packages: tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} @@ -8804,6 +8765,10 @@ snapshots: dependencies: regenerator-runtime: 0.14.0 + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.0 + '@babel/standalone@7.24.5': {} '@babel/template@7.24.0': @@ -9105,7 +9070,7 @@ snapshots: transitivePeerDependencies: - '@algolia/client-search' - '@ecies/ciphers@0.2.0(@noble/ciphers@1.0.0)': + '@ecies/ciphers@0.2.1(@noble/ciphers@1.0.0)': dependencies: '@noble/ciphers': 1.0.0 @@ -9695,13 +9660,13 @@ snapshots: '@metamask/safe-event-emitter@3.1.1': {} - '@metamask/sdk-communication-layer@0.30.0(cross-fetch@4.0.0(encoding@0.1.13))(eciesjs@0.4.9)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.0.0(encoding@0.1.13))(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: bufferutil: 4.0.8 cross-fetch: 4.0.0(encoding@0.1.13) date-fns: 2.30.0 debug: 4.3.7 - eciesjs: 0.4.9 + eciesjs: 0.4.12 eventemitter2: 6.4.9 readable-stream: 3.6.2 socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -9710,43 +9675,34 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.30.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@metamask/sdk-install-modal-web@0.31.0': dependencies: - i18next: 23.11.5 - qr-code-styling: 1.6.0-rc.1 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@paulmillr/qr': 0.2.1 - '@metamask/sdk@0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.31.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': dependencies: + '@babel/runtime': 7.26.0 '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 - '@metamask/sdk-communication-layer': 0.30.0(cross-fetch@4.0.0(encoding@0.1.13))(eciesjs@0.4.9)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.30.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.0.0(encoding@0.1.13))(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.31.0 + '@paulmillr/qr': 0.2.1 bowser: 2.11.0 cross-fetch: 4.0.0(encoding@0.1.13) debug: 4.3.7 - eciesjs: 0.4.9 + eciesjs: 0.4.12 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 - i18next: 23.11.5 - i18next-browser-languagedetector: 7.1.0 obj-multiplex: 1.0.0 pump: 3.0.0 - qrcode-terminal-nooctal: 0.12.1 - react-native-webview: 11.26.1(react@18.3.1) readable-stream: 3.6.2 socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) + tslib: 2.8.1 util: 0.12.5 uuid: 8.3.2 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: - bufferutil - encoding - - react-native - supports-color - utf-8-validate @@ -10607,6 +10563,8 @@ snapshots: '@parcel/watcher-win32-ia32': 2.4.1 '@parcel/watcher-win32-x64': 2.4.1 + '@paulmillr/qr@0.2.1': {} + '@pkgjs/parseargs@0.11.0': optional: true @@ -13310,7 +13268,7 @@ snapshots: date-fns@2.30.0: dependencies: - '@babel/runtime': 7.23.4 + '@babel/runtime': 7.26.0 dateformat@4.6.3: {} @@ -13456,9 +13414,9 @@ snapshots: optionalDependencies: wcwidth: 1.0.1 - eciesjs@0.4.9: + eciesjs@0.4.12: dependencies: - '@ecies/ciphers': 0.2.0(@noble/ciphers@1.0.0) + '@ecies/ciphers': 0.2.1(@noble/ciphers@1.0.0) '@noble/ciphers': 1.0.0 '@noble/curves': 1.6.0 '@noble/hashes': 1.5.0 @@ -13636,8 +13594,6 @@ snapshots: escape-string-regexp@1.0.5: {} - escape-string-regexp@2.0.0: {} - escape-string-regexp@4.0.0: {} escape-string-regexp@5.0.0: {} @@ -14347,14 +14303,6 @@ snapshots: human-signals@7.0.0: {} - i18next-browser-languagedetector@7.1.0: - dependencies: - '@babel/runtime': 7.23.4 - - i18next@23.11.5: - dependencies: - '@babel/runtime': 7.23.4 - iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -14398,10 +14346,6 @@ snapshots: ini@4.1.1: {} - invariant@2.2.4: - dependencies: - loose-envify: 1.4.0 - io-ts@1.10.4: dependencies: fp-ts: 1.19.3 @@ -16446,14 +16390,6 @@ snapshots: punycode@2.3.1: {} - qr-code-styling@1.6.0-rc.1: - dependencies: - qrcode-generator: 1.4.4 - - qrcode-generator@1.4.4: {} - - qrcode-terminal-nooctal@0.12.1: {} - qrcode@1.5.3: dependencies: dijkstrajs: 1.0.2 @@ -16504,12 +16440,6 @@ snapshots: react-is@17.0.2: {} - react-native-webview@11.26.1(react@18.3.1): - dependencies: - escape-string-regexp: 2.0.0 - invariant: 2.2.4 - react: 18.3.1 - react-refresh@0.14.0: {} react@18.3.1: @@ -17249,6 +17179,8 @@ snapshots: tslib@2.5.0: {} + tslib@2.8.1: {} + tsort@0.0.1: {} tuf-js@2.2.1: