From 5f1448f2ef87e61dad5850a9adc4f94c499040b4 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 7 Apr 2023 13:53:03 +0100 Subject: [PATCH] Use EthereumProvider with supported wallets --- apps/remix-ide/src/app/udapp/run-tab.js | 2 +- apps/remix-ide/src/blockchain/blockchain.tsx | 8 + apps/wallet-connect/src/app/app.tsx | 118 ++++-- apps/wallet-connect/src/css/app.css | 4 - .../src/services/RemixClient.ts | 40 +- apps/wallet-connect/src/services/provider.ts | 53 +++ .../run-tab/src/lib/actions/events.ts | 6 + package.json | 5 +- yarn.lock | 343 ++++++++++++++---- 9 files changed, 455 insertions(+), 124 deletions(-) create mode 100644 apps/wallet-connect/src/services/provider.ts diff --git a/apps/remix-ide/src/app/udapp/run-tab.js b/apps/remix-ide/src/app/udapp/run-tab.js index 6c08ff7c61..4c0b61df7f 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.js +++ b/apps/remix-ide/src/app/udapp/run-tab.js @@ -170,7 +170,7 @@ export class RunTab extends ViewPlugin { await addProvider('injected-optimism-provider', 'L2 - Optimism Provider', true, false) await addProvider('injected-arbitrum-one-provider', 'L2 - Arbitrum One Provider', true, false) - await addProvider('walletConnect2', 'Wallet Connect', false, false) + await addProvider('walletconnect', 'Wallet Connect', false, false) } diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index bd9817269e..3c9e40fb08 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -111,12 +111,20 @@ export class Blockchain extends Plugin { this._triggerEvent('networkStatus', [this.networkStatus]) }) }) + + this.on('walletconnect', 'chainChanged', () => { + this.detectNetwork((error, network) => { + this.networkStatus = { network, error } + this._triggerEvent('networkStatus', [this.networkStatus]) + }) + }) } onDeactivation () { this.active = false this.off('injected', 'chainChanged') this.off('injected-trustwallet', 'chainChanged') + this.off('walletconnect', 'chainChanged') } setupEvents () { diff --git a/apps/wallet-connect/src/app/app.tsx b/apps/wallet-connect/src/app/app.tsx index 75c7cf5501..76203a31cb 100644 --- a/apps/wallet-connect/src/app/app.tsx +++ b/apps/wallet-connect/src/app/app.tsx @@ -1,44 +1,106 @@ import React, { useEffect, useState } from 'react' +import EthereumProvider from '@walletconnect/ethereum-provider' import '../css/app.css' import '@fortawesome/fontawesome-free/css/all.css' -import { PROJECT_ID } from '../services/constant' -import { EthereumClient } from '@web3modal/ethereum' -import { Web3Button, Web3Modal, Web3NetworkSwitch } from '@web3modal/react' -import { WagmiConfig } from 'wagmi' import { RemixClient } from '../services/RemixClient' +import { PROJECT_ID } from '../services/constant' +import { Web3Modal } from '@web3modal/standalone' -const p = new RemixClient() +const remix = new RemixClient() +const web3Modal = new Web3Modal({ + projectId: PROJECT_ID, + standaloneChains: ["eip155:1"], + walletConnectVersion: 2 +}) function App() { - const [ethereumClient, setEthereumClient] = useState(null) - const [wagmiClient, setWagmiClient] = useState(null) + const [isConnected, setIsConnected] = useState(false) + const [provider, setProvider] = useState() + const [accounts, setAccounts] = useState([]) useEffect(() => { - (async () => { - await p.init() - const ethereumClient = new EthereumClient(p.wagmiClient, p.chains) - - setWagmiClient(p.wagmiClient) - setEthereumClient(ethereumClient) - })() - }, []) + if (!provider) { + createClient() + } + }, [provider]) + + const createClient = async () => { + try { + const provider = await EthereumProvider.init({ + projectId: PROJECT_ID, + chains: [1], + showQrModal: true + }) + + provider.modal = web3Modal + setProvider(provider) + } catch (e) { + console.log(e) + } + } + + const handleConnect = async () => { + if (!provider) throw Error("Cannot connect. Sign Client is not created") + try { + subscribeToEvents(provider) + await provider.connect() + remix.walletConnectClient = provider + } catch (e) { + console.log(e) + } + } + + const handleDisconnect = async () => { + try { + await provider.disconnect() + reset() + } catch (e) { + console.log(e) + } + } + + const subscribeToEvents = (provider: EthereumProvider) => { + if (!provider) throw Error("Provider does not exist") + + try { + provider.on('connect', () => { + setIsConnected(true) + }) + + provider.on('chainChanged', (args) => { + remix.emit('chainChanged', args) + }) + + provider.on('accountsChanged', (args) => { + remix.emit('accountsChanged', args) + }) + } catch (e) { + console.log(e) + } + } + + const reset = () => { + setAccounts([]) + setIsConnected(false) + } return (
-
- { wagmiClient && - - - } -
-
- { wagmiClient && - - - - } +
+ { !isConnected && } + { isConnected && } +
+
+ { accounts.length > 0 && +
+

+
    + { accounts.map((account, index) =>
  • { account }
  • ) } +
- { ethereumClient && } + } + {/*
*/} +
) } diff --git a/apps/wallet-connect/src/css/app.css b/apps/wallet-connect/src/css/app.css index a60f767e6f..74b5e05345 100644 --- a/apps/wallet-connect/src/css/app.css +++ b/apps/wallet-connect/src/css/app.css @@ -36,7 +36,3 @@ transform: rotate(360deg); } } - -#disconnectbtn, #accounts-container { - display: none; -} \ No newline at end of file diff --git a/apps/wallet-connect/src/services/RemixClient.ts b/apps/wallet-connect/src/services/RemixClient.ts index 87864277c5..7b1b3a106e 100644 --- a/apps/wallet-connect/src/services/RemixClient.ts +++ b/apps/wallet-connect/src/services/RemixClient.ts @@ -1,13 +1,9 @@ import { PluginClient } from '@remixproject/plugin' import { createClient } from '@remixproject/plugin-webview' -import { w3mConnectors, w3mProvider } from '@web3modal/ethereum' -import { configureChains, createClient as wagmiCreateClient } from 'wagmi' -import { arbitrum, mainnet, polygon, optimism, Chain, goerli, sepolia } from 'wagmi/chains' -import { PROJECT_ID } from './constant' +import EthereumProvider from '@walletconnect/ethereum-provider' export class RemixClient extends PluginClient { - wagmiClient - chains: Chain[] + #walletConnectClient: EthereumProvider constructor() { super() @@ -16,30 +12,26 @@ export class RemixClient extends PluginClient { this.onload() } - async init() { - try { - this.chains = [arbitrum, mainnet, polygon, optimism, goerli, sepolia] - - const { provider } = configureChains(this.chains, [w3mProvider({ projectId: PROJECT_ID })]) - this.wagmiClient = wagmiCreateClient({ - autoConnect: false, - connectors: w3mConnectors({ projectId: PROJECT_ID, version: 1, chains: this.chains }), - provider - }) - } catch (e) { - return console.error("Could not get a wallet connection", e) - } + init () { + console.log('initialzing...') } - sendAsync = (data) => { + set walletConnectClient (value: EthereumProvider) { + this.#walletConnectClient = value + } + + sendAsync = (data: { id: string, method: string, params: any[] }) => { return new Promise((resolve, reject) => { - if (this.wagmiClient.provider) { - this.wagmiClient.provider.send(data.method, data.params).then((message) => { + if (this.#walletConnectClient) { + if (data.method === 'eth_chainId') data.method = 'eth_chainId' + this.#walletConnectClient.sendAsync(data, (error, message) => { + console.log('method: ', data.method) + if (error) return reject(error) + console.log('message: ', message) resolve({"jsonrpc": "2.0", "result": message, "id": data.id}) - }).catch((error) => { - reject(error) }) } else { + console.error('Remix Client is not connected to WalletConnect Client.') resolve({"jsonrpc": "2.0", "result": [], "id": data.id}) } }) diff --git a/apps/wallet-connect/src/services/provider.ts b/apps/wallet-connect/src/services/provider.ts new file mode 100644 index 0000000000..57560fb22b --- /dev/null +++ b/apps/wallet-connect/src/services/provider.ts @@ -0,0 +1,53 @@ +import { providers } from 'ethers' + +import type { Chain } from 'wagmi/chains' +import type { ChainProviderFn } from 'wagmi/' + +interface FallbackProviderConfig { + // The Provider + provider: any; + + // The priority to favour this Provider; lower values are used first (higher priority) + priority?: number; + + // Timeout before also triggering the next provider; this does not stop + // this provider and if its result comes back before a quorum is reached + // it will be incorporated into the vote + // - lower values will cause more network traffic but may result in a + // faster result. + stallTimeout?: number; + + // How much this provider contributes to the quorum; sometimes a specific + // provider may be more reliable or trustworthy than others, but usually + // this should be left as the default + weight?: number; +} + +export function customProvider({ + priority, + stallTimeout, + weight, +}: FallbackProviderConfig): ChainProviderFn< + TChain, + providers.Web3Provider, + providers.WebSocketProvider +> { + return function (chain) { + return { + chain: { + ...chain, + } as TChain, + provider: () => { + const provider = new providers.Web3Provider( + window.ethereum, + { + chainId: chain.id, + name: chain.network, + ensAddress: chain.contracts?.ensRegistry?.address, + } + ) + return Object.assign(provider, { priority, stallTimeout, weight }) + } + } + } +} \ No newline at end of file diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index 5fd49279d2..73fc0b849c 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -135,6 +135,12 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { dispatch(fetchAccountsListSuccess(accountsMap)) }) + plugin.on('walletconnect', 'accountsChanged', (accounts: Array) => { + const accountsMap = {} + accounts.map(account => { accountsMap[account] = shortenAddress(account, '0')}) + dispatch(fetchAccountsListSuccess(accountsMap)) + }) + setInterval(() => { fillAccountsList(plugin, dispatch) updateInstanceBalance(plugin, dispatch) diff --git a/package.json b/package.json index 318aed3337..f06a465aa2 100644 --- a/package.json +++ b/package.json @@ -138,8 +138,11 @@ "@remixproject/plugin-webview": "0.3.33", "@remixproject/plugin-ws": "0.3.33", "@types/nightwatch": "^2.3.1", + "@walletconnect/ethereum-provider": "^2.6.2", + "@walletconnect/sign-client": "^2.6.0", "@web3modal/ethereum": "^2.2.2", "@web3modal/react": "^2.2.2", + "@web3modal/standalone": "^2.2.2", "ansi-gray": "^0.1.1", "async": "^2.6.2", "axios": "1.1.2", @@ -205,7 +208,7 @@ "tree-kill": "^1.2.2", "ts-loader": "^9.2.6", "tslib": "^2.3.0", - "wagmi": "^0.12.6", + "wagmi": "^0.12.7", "web3": "^1.8.0", "winston": "^3.3.3", "ws": "^7.3.0" diff --git a/yarn.lock b/yarn.lock index e9964591f7..1f377c81ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6024,6 +6024,11 @@ resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.3.tgz#a136f83b0758698df454e328759dbd3d44555311" integrity sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g== +"@types/unist@*", "@types/unist@^2.0.0": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" + integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== + "@types/warning@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/warning/-/warning-3.0.0.tgz#0d2501268ad8f9962b740d387c4654f5f8e23e52" @@ -6164,39 +6169,39 @@ resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-0.2.14.tgz#fff331e1f160848ba730b319b39023df8c1e52ee" integrity sha512-esWhs1sf8/J/u+54F/sUQ97iZ/zUN2rYUrLYOD35ynIJn9ZwGXeV/tkiXx/6xXDmq0VK5oe1Pe7BU/pvaURzcA== -"@wagmi/connectors@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-0.3.8.tgz#cc5b5815540eed0b6aed31d5c59c3c87b21d0871" - integrity sha512-SLukavwDqFiMO+GmAdxdEXKnAbNcBcOUtVu6QjhOPzmcETA59f2QWleUPDBZx62SE40HAiA/Z53exAiWUqIelA== +"@wagmi/connectors@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-0.3.10.tgz#8742822fcf0c3edc6b8f12be2f74de8c65becaec" + integrity sha512-O9wa6N47TJtpVdBXaONxXXjiq9ahXboGbBnf6m5tb4RIirCzEY7gnsJYYd61k3TQjd9T++xKKKzDTysm37hUHg== dependencies: "@coinbase/wallet-sdk" "^3.5.4" "@ledgerhq/connect-kit-loader" "^1.0.1" "@safe-global/safe-apps-provider" "^0.15.2" "@safe-global/safe-apps-sdk" "^7.9.0" - "@walletconnect/ethereum-provider" "^2.5.1" + "@walletconnect/ethereum-provider" "2.5.2" "@walletconnect/legacy-provider" "^2.0.0" - "@web3modal/standalone" "^2.2.1" + "@web3modal/standalone" "2.2.2" abitype "^0.3.0" eventemitter3 "^4.0.7" -"@wagmi/core@0.10.6": - version "0.10.6" - resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.6.tgz#02a071d400d7b21d9ed5b72d305ac54b58abd683" - integrity sha512-dtQo3pARUKPsU3+K60ojkYVPpGX12T+dgfbNwYLASpXhwwk5hElhP7YBm/9tMYk4ZIup+yQetTAmoa8/+JW2ng== +"@wagmi/core@0.10.7": + version "0.10.7" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.7.tgz#13f21d97d42517ac258eb0639d97df4a183f7455" + integrity sha512-D12tGHPzrJPuYoknTZ8DQHpK1AqosbdSNmFXX7EOPKsSfH139PPiLU4L1ZhcS8WprnPDczOT2AN9JNvzYqjyOw== dependencies: "@wagmi/chains" "0.2.14" - "@wagmi/connectors" "0.3.8" + "@wagmi/connectors" "0.3.10" abitype "^0.3.0" eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.5.1.tgz#fed485577e73bc9dee25ae16f80352818c33b723" - integrity sha512-Q+dH+LSK85PwpmbjAFoi9ddWTFFghyZWwi1bGfgFA4h3tk4vfh+F0oW44bREaeHAQ/y1va0f2OdK6/jagOeMLQ== +"@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" @@ -6205,8 +6210,52 @@ "@walletconnect/relay-auth" "^1.0.4" "@walletconnect/safe-json" "^1.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.5.1" - "@walletconnect/utils" "2.5.1" + "@walletconnect/types" "2.5.2" + "@walletconnect/utils" "2.5.2" + events "^3.3.0" + lodash.isequal "4.5.0" + pino "7.11.0" + uint8arrays "^3.1.0" + +"@walletconnect/core@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.6.0.tgz#7a3a6c4849e90885d15c6d29dd85cd4af22b211c" + integrity sha512-Ma2coHOKiNYiYhYiuaT2gRfR4obp3TYbt+cdXM5i7kOkZ6Z0KrmC6L1ZK2RMPdDiDbbbhRPGpuwh0VMy7NLjFA== + dependencies: + "@walletconnect/heartbeat" "1.2.0" + "@walletconnect/jsonrpc-provider" "1.0.10" + "@walletconnect/jsonrpc-utils" "^1.0.4" + "@walletconnect/jsonrpc-ws-connection" "1.0.10" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.6.0" + "@walletconnect/utils" "2.6.0" + events "^3.3.0" + lodash.isequal "4.5.0" + pino "7.11.0" + uint8arrays "^3.1.0" + +"@walletconnect/core@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.6.2.tgz#88c35fd28f78c0527364d200ef7a26d4fe8cda31" + integrity sha512-uTla1Dyhr9ye1SbyubyxpUlW7r4oVf47EgIMEntbmMK6+xFpeiF7w5hNebIwp9g/dW81QQklwp3c0slwkTahdg== + dependencies: + "@walletconnect/heartbeat" "1.2.0" + "@walletconnect/jsonrpc-provider" "^1.0.12" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/jsonrpc-ws-connection" "^1.0.11" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.6.2" + "@walletconnect/utils" "2.6.2" events "^3.3.0" lodash.isequal "4.5.0" pino "7.11.0" @@ -6240,19 +6289,34 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@^2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.5.1.tgz#f2f371c9867461e0561b2df50a77e35578189670" - integrity sha512-ESg5BYY//BLzb4SUHANn/ZaSZpZGUtNz6Yf//405ZW1/+sRkKhGspFgUVZ0TqmolY4kSwquf6Q8q67ZHhcY/jw== +"@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.5.1" - "@walletconnect/types" "2.5.1" - "@walletconnect/universal-provider" "2.5.1" - "@walletconnect/utils" "2.5.1" + "@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/ethereum-provider@^2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.6.2.tgz#5fa27bff278e00aee7a2d0d6e53efeef25cd84ea" + integrity sha512-IFYxvl+cHDPR+bJiocEF/EfqEB5eNxeQOxb8mKtA4vzFGck2H7ft+k1ObMwrBlC387NjzsD3Uyr0dT7qYaSWCg== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.4" + "@walletconnect/jsonrpc-provider" "^1.0.11" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/sign-client" "2.6.2" + "@walletconnect/types" "2.6.2" + "@walletconnect/universal-provider" "2.6.2" + "@walletconnect/utils" "2.6.2" events "^3.3.0" "@walletconnect/events@^1.0.1": @@ -6263,7 +6327,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.0": +"@walletconnect/heartbeat@1.2.0", "@walletconnect/heartbeat@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.0.tgz#1e87dd234cb72b0587b84f95c4f942f2b4bd0c79" integrity sha512-0vbzTa/ARrpmMmOD+bQMxPvFYKtOLQZObgZakrYr0aODiMOO71CmPVNV2eAqXnw9rMmcP+z91OybLeIFlwTjjA== @@ -6285,16 +6349,7 @@ 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== - dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - tslib "1.14.1" - -"@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@1.0.10", "@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.10.tgz#8351a06b70faa8f8c0e77dc2c6d9b0190d17d407" integrity sha512-g0ffPSpY3P6GqGjWGHsr3yqvQUhj7q2k6pAikoXv5XTXWaJRzFvrlbFkSgxziXsBrwrMZn0qvPufvpN4mMZ5FA== @@ -6303,6 +6358,15 @@ "@walletconnect/safe-json" "^1.0.1" tslib "1.14.1" +"@walletconnect/jsonrpc-provider@^1.0.11", "@walletconnect/jsonrpc-provider@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.12.tgz#965408d99fc889d49c194cd207804282805f45ed" + integrity sha512-6uI2y5281gloZSzICOjk+CVC7CVu0MhtMt2Yzpj05lPb0pzm/bK2oZ2ibxwLerPrqpNt/5bIFVRmoOgPw1mHAQ== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/safe-json" "^1.0.2" + tslib "1.14.1" + "@walletconnect/jsonrpc-types@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.2.tgz#b79519f679cd6a5fa4a1bea888f27c1916689a20" @@ -6320,6 +6384,15 @@ "@walletconnect/jsonrpc-types" "^1.0.2" tslib "1.14.1" +"@walletconnect/jsonrpc-utils@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.7.tgz#1812d17c784f1ec0735bf03d0884287f60bfa2ce" + integrity sha512-zJziApzUF/Il4VcwabnaU+0yo1QI4eUkYX99zmCVTHJvZOf2l0zjADf/OpKqWyeNFC3Io56Z/8uJHVtcNVvyFA== + dependencies: + "@walletconnect/environment" "^1.0.1" + "@walletconnect/jsonrpc-types" "^1.0.2" + tslib "1.14.1" + "@walletconnect/jsonrpc-ws-connection@1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.10.tgz#04e04a7d8c70b27c386a1bdd9ff6511045da3c81" @@ -6331,6 +6404,17 @@ tslib "1.14.1" ws "^7.5.1" +"@walletconnect/jsonrpc-ws-connection@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz#1ce59d86f273d576ca73385961303ebd44dd923f" + integrity sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + tslib "1.14.1" + ws "^7.5.1" + "@walletconnect/keyvaluestorage@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.0.2.tgz#92f5ca0f54c1a88a093778842ce0c874d86369c8" @@ -6444,19 +6528,58 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.5.1.tgz#58f5d1acaf592a680f5e19a101dac6ada6a88cc5" - integrity sha512-c5HzOXr4EhhJ0ozxne4ahCyS8mbW1NSgTEcW/c8LxsaRcMejY8l+1DGwWGpeD4c6K1jmxKGCGS8HxjY+igN5+Q== +"@walletconnect/safe-json@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" + integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== + dependencies: + tslib "1.14.1" + +"@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.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.5.2" + "@walletconnect/utils" "2.5.2" + events "^3.3.0" + pino "7.11.0" + +"@walletconnect/sign-client@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.6.2.tgz#95a087446e0284139b043a3a35500d0525e5c7f2" + integrity sha512-2/yXliVVRn27i4rCuIumBB361ZQtKCgAwm6OmPW8P2wJpmJ03K0FuLzuYbYy/WvweuFklQ92cQlg3V8Ez5M+vA== + dependencies: + "@walletconnect/core" "2.6.2" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "^1.2.0" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.6.2" + "@walletconnect/utils" "2.6.2" + events "^3.3.0" + pino "7.11.0" + +"@walletconnect/sign-client@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.6.0.tgz#44bc481b42a108329c4270b8042e8258a453a6ca" + integrity sha512-t46sMUSvu418Krc0oXHcoazdxWe8wvprxZ0SF34R99HsU9XxhIC6bS5mhizPiwn60gAMrgE6KtAXzXJFCp4kqw== dependencies: - "@walletconnect/core" "2.5.1" + "@walletconnect/core" "2.6.0" "@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.5.1" - "@walletconnect/utils" "2.5.1" + "@walletconnect/types" "2.6.0" + "@walletconnect/utils" "2.6.0" events "^3.3.0" pino "7.11.0" @@ -6467,10 +6590,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.5.1": - 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": + 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" @@ -6479,27 +6602,68 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/universal-provider@2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.5.1.tgz#ec926848644b8177ac0b9c6396cfc7ab6d78c166" - integrity sha512-FpbBxuPDP/Cdkbb+8Pkzc4wTM1+zKaD9TNX1+BO9zwpwbZ35AKXeK/e5k0CSxLnZoZNXlI4gEXPZ6mWoq0Zilg== +"@walletconnect/types@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.6.0.tgz#2548590bcee1a4143ed7c6209bd1837bac667843" + integrity sha512-Rob72yUFnXMlvnV2On4MYQ+TPQGAqRB/pfX8MDZqe72rY2Hn6qz/TwPd4abMF7GWdv8d89UO3nvpkbtI2MNpsw== + 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/types@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.6.2.tgz#105d075165504588a47dabebc92ba00441b188e6" + integrity sha512-eP9xfNVdoQrIfqJSlHqijf0l/Rw/XTO2SeFVlgA5UFHpMhhAo/kzuL+xC2iOkoGKEus4fM3lCuIw+aCZCwZA3g== + 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.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.5.1" - "@walletconnect/types" "2.5.1" - "@walletconnect/utils" "2.5.1" + "@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.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.5.1.tgz#466cfc76688b9048923ffaf75621c98a0f21c9e7" - integrity sha512-+Pr3kj0CjxEeSxoRtj9lOfsDRLjwI5RyuwASUy4mcTGil59rdAK0Z7Uht3/+HEXB05AUyEJihpQEwworcGu/uw== +"@walletconnect/universal-provider@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.6.2.tgz#7c39a4aee3bb3ef41acb011eeb85b0d6e9c15812" + integrity sha512-CT7xFYGhGYYdo1rMCGnCuAueUYSVirqs6Tk9/ZoK/wf3vBNefTBxStW0Twgr+Fr5mgeOh4k4NWjPJIwfGTc/Fg== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.4" + "@walletconnect/jsonrpc-provider" "^1.0.11" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/sign-client" "2.6.2" + "@walletconnect/types" "2.6.2" + "@walletconnect/utils" "2.6.2" + eip1193-provider "1.0.1" + events "^3.3.0" + pino "7.11.0" + +"@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" @@ -6510,7 +6674,49 @@ "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.5.1" + "@walletconnect/types" "2.5.2" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "5.3.0" + query-string "7.1.1" + uint8arrays "^3.1.0" + +"@walletconnect/utils@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.6.0.tgz#42d3a196c059342e8c7c96bcab47e84419ed0189" + integrity sha512-XQXc83PEBrGOfyH2emzBg57OQ43SENPhLt0YHwARMpiHsMmUyK12IUX9R2jJWVZV1L81KWkt7ZUFRe39+d5kMg== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.4" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.6.0" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "5.3.0" + query-string "7.1.1" + uint8arrays "^3.1.0" + +"@walletconnect/utils@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.6.2.tgz#03e2597533b6e7370c28040de54942fe25e5bb8b" + integrity sha512-G0gtWQd5PhT7Z3h9zy5H6bG8t9likb5+hP2ZuBbt/vTu8ONPEsTcH1Ior2lUjuYLQ9ufK3LMZM85pO+wWLRVaw== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.6.2" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" @@ -6554,7 +6760,7 @@ "@web3modal/standalone" "2.2.2" "@web3modal/ui" "2.2.2" -"@web3modal/standalone@2.2.2", "@web3modal/standalone@^2.2.1": +"@web3modal/standalone@2.2.2", "@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== @@ -26888,15 +27094,15 @@ w3c-blob@0.0.1: resolved "https://registry.yarnpkg.com/w3c-blob/-/w3c-blob-0.0.1.tgz#b0cd352a1a50f515563420ffd5861f950f1d85b8" integrity sha1-sM01KhpQ9RVWNCD/1YYflQ8dhbg= -wagmi@^0.12.6: - version "0.12.6" - resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.6.tgz#3ad79104ce37d0a690c209af407a275b26bc3515" - integrity sha512-IxU+m/AWPpCvFzXuT93hWNcB1n28HFF7V7fziAgidGKdnha/R4juNk2nuzvEx4+8WLepTEWwbZyT9XMKJYMJ7w== +wagmi@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.7.tgz#f2a7fe03e8de2cd5e6d381728fad3f45413f04b2" + integrity sha512-L1yE+6KVeUNWKLMr2VXTB3bYHYJhC9kjt7HeAo1o4r4P6ZRJiTD7haTP+Lwzd4EqHCsyN4Zzfnb3Eh6RdcVwvA== dependencies: "@tanstack/query-sync-storage-persister" "^4.14.5" "@tanstack/react-query" "^4.14.5" "@tanstack/react-query-persist-client" "^4.14.5" - "@wagmi/core" "0.10.6" + "@wagmi/core" "0.10.7" abitype "^0.3.0" use-sync-external-store "^1.2.0" @@ -28052,3 +28258,8 @@ zustand@^4.3.1: integrity sha512-6J5zDxjxLE+yukC2XZWf/IyWVKnXT9b9HUv09VJ/bwGCpKNcaTqp7Ws28Xr8jnbvnZcdRaidztAPsXFBIqufiw== dependencies: use-sync-external-store "1.2.0" + +zwitch@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" + integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==