diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aa6ec2de8..3342b59fa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -424,6 +424,9 @@ jobs: path: tmp - name: Copy dotenv run: cat tmp/dotenv >> .env && rm -rf tmp + - name: Set IS_TESTING=true + run: | + sed -i 's/IS_TESTING.*/IS_TESTING=true/g' .env - name: Run unit tests run: yarn test diff --git a/e2e/helpers.ts b/e2e/helpers.ts index 30b204d094..f725ea7564 100644 --- a/e2e/helpers.ts +++ b/e2e/helpers.ts @@ -18,8 +18,8 @@ import { } from 'selenium-webdriver'; import chrome from 'selenium-webdriver/chrome'; import firefox from 'selenium-webdriver/firefox'; +import { erc20Abi } from 'viem'; import { expect } from 'vitest'; -import { erc20ABI } from 'wagmi'; import { RAINBOW_TEST_DAPP } from '~/core/references/links'; @@ -756,7 +756,7 @@ export async function connectToTestDapp(driver: WebDriver) { export async function getOnchainBalance(addy: string, contract: string) { try { const provider = getDefaultProvider('http://127.0.0.1:8545'); - const testContract = new Contract(contract, erc20ABI, provider); + const testContract = new Contract(contract, erc20Abi, provider); const balance = await testContract.balanceOf(addy); return balance; diff --git a/e2e/serial/optimismTransactions/1_sendFlow.test.ts b/e2e/serial/optimismTransactions/1_sendFlow.test.ts index be1dcc3d0e..7449735254 100644 --- a/e2e/serial/optimismTransactions/1_sendFlow.test.ts +++ b/e2e/serial/optimismTransactions/1_sendFlow.test.ts @@ -108,7 +108,7 @@ describe('Complete Hardhat Optimism send flow', () => { it('should be able to select asset to send with keyboard', async () => { await navigateToElementWithTestId({ driver, - testId: 'asset-name-eth_10', + testId: 'asset-name-0x0000000000000000000000000000000000000000_10', }); await delayTime('long'); const tokenInput = await findElementByTestId({ diff --git a/e2e/serial/send/2_shortcuts-sendFlow.test.ts b/e2e/serial/send/2_shortcuts-sendFlow.test.ts index 0e620f1b9a..f4d3560690 100644 --- a/e2e/serial/send/2_shortcuts-sendFlow.test.ts +++ b/e2e/serial/send/2_shortcuts-sendFlow.test.ts @@ -100,7 +100,6 @@ describe('Complete send flow via shortcuts and keyboard navigation', () => { it('should be able to save contact', async () => { await executePerformShortcut({ driver, key: 'DECIMAL' }); await driver.actions().sendKeys('0xtester.eth').perform(); - await executePerformShortcut({ driver, key: 'TAB' }); await executePerformShortcut({ driver, key: 'ENTER' }); await delayTime('long'); }); diff --git a/e2e/serial/swap/2_swapFlow2.test.ts b/e2e/serial/swap/2_swapFlow2.test.ts index 0750da34ce..a8b6bb40e6 100644 --- a/e2e/serial/swap/2_swapFlow2.test.ts +++ b/e2e/serial/swap/2_swapFlow2.test.ts @@ -3,8 +3,8 @@ import 'geckodriver'; import { Contract } from '@ethersproject/contracts'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import { WebDriver } from 'selenium-webdriver'; +import { erc20Abi } from 'viem'; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from 'vitest'; -import { erc20ABI } from 'wagmi'; import { ChainId } from '~/core/types/chains'; @@ -153,7 +153,7 @@ it('should be able to execute unlock and swap', async () => { await delayTime('short'); const tokenContract = new Contract( SWAP_VARIABLES.USDC_MAINNET_ADDRESS, - erc20ABI, + erc20Abi, provider, ); const usdcBalanceBeforeSwap = await tokenContract.balanceOf( diff --git a/package.json b/package.json index a8db6628b0..142f86732b 100644 --- a/package.json +++ b/package.json @@ -102,16 +102,16 @@ "@radix-ui/react-select": "1.2.1", "@radix-ui/react-tabs": "1.0.4", "@radix-ui/react-tooltip": "1.0.3", - "@rainbow-me/provider": "0.0.12", + "@rainbow-me/provider": "0.1.0", "@rainbow-me/swaps": "0.19.0", "@rudderstack/analytics-js-service-worker": "3.0.6", "@scure/bip39": "1.2.1", "@sentry/browser": "7.69.0", "@sentry/tracing": "7.69.0", - "@tanstack/query-async-storage-persister": "4.29.19", - "@tanstack/react-query": "4.29.19", - "@tanstack/react-query-persist-client": "4.29.19", - "@tanstack/react-virtual": "3.0.0-beta.54", + "@tanstack/query-async-storage-persister": "5.35.1", + "@tanstack/react-query": "5.35.1", + "@tanstack/react-query-persist-client": "5.35.1", + "@tanstack/react-virtual": "3.5.0", "@trezor/connect-plugin-ethereum": "9.0.2", "@types/qs": "6.9.7", "@vanilla-extract/css": "1.9.1", @@ -152,8 +152,8 @@ "react-switch": "7.0.0", "socket.io-client": "4.5.3", "validator": "13.9.0", - "viem": "1.21.4", - "wagmi": "0.12.19", + "viem": "2.10.1", + "wagmi": "2.8.1", "word-wrap": "1.2.4", "zustand": "4.1.5" }, @@ -319,7 +319,9 @@ "@ledgerhq/domain-service>eip55>keccak": false, "wagmi>@wagmi/core>@wagmi/connectors>@coinbase/wallet-sdk>keccak": false, "viem>ws>bufferutil": false, - "viem>ws>utf-8-validate": false + "viem>ws>utf-8-validate": false, + "wagmi>@wagmi/connectors>@coinbase/wallet-sdk>keccak": false, + "wagmi>@wagmi/connectors>@metamask/sdk>eciesjs>secp256k1": false } } } \ No newline at end of file diff --git a/patches/@tanstack+query-core+4.29.19.patch b/patches/@tanstack+query-core+4.29.19.patch deleted file mode 100644 index 2e68c780bf..0000000000 --- a/patches/@tanstack+query-core+4.29.19.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/node_modules/@tanstack/query-core/build/lib/queryObserver.esm.js b/node_modules/@tanstack/query-core/build/lib/queryObserver.esm.js -index cc9474e..eb3ee72 100644 ---- a/node_modules/@tanstack/query-core/build/lib/queryObserver.esm.js -+++ b/node_modules/@tanstack/query-core/build/lib/queryObserver.esm.js -@@ -347,7 +347,8 @@ class QueryObserver extends Subscribable { - const result = { - status, - fetchStatus, -- isLoading, -+ isLoading: isLoading && fetchStatus === 'fetching', -+ isIdle: isLoading && fetchStatus === 'idle', - isSuccess: status === 'success', - isError, - isInitialLoading: isLoading && isFetching, -diff --git a/node_modules/@tanstack/query-core/build/lib/queryObserver.js b/node_modules/@tanstack/query-core/build/lib/queryObserver.js -index ca53940..c1f0238 100644 ---- a/node_modules/@tanstack/query-core/build/lib/queryObserver.js -+++ b/node_modules/@tanstack/query-core/build/lib/queryObserver.js -@@ -351,7 +351,8 @@ class QueryObserver extends subscribable.Subscribable { - const result = { - status, - fetchStatus, -- isLoading, -+ isLoading: isLoading && fetchStatus === 'fetching', -+ isIdle: isLoading && fetchStatus === 'idle', - isSuccess: status === 'success', - isError, - isInitialLoading: isLoading && isFetching, -diff --git a/node_modules/@tanstack/query-core/build/lib/types.d.ts b/node_modules/@tanstack/query-core/build/lib/types.d.ts -index 5232e9d..ac3270d 100644 ---- a/node_modules/@tanstack/query-core/build/lib/types.d.ts -+++ b/node_modules/@tanstack/query-core/build/lib/types.d.ts -@@ -231,6 +231,7 @@ export interface QueryObserverBaseResult { - isFetched: boolean; - isFetchedAfterMount: boolean; - isFetching: boolean; -+ isIdle: boolean; - isLoading: boolean; - isLoadingError: boolean; - isInitialLoading: boolean; -@@ -250,7 +251,8 @@ export interface QueryObserverLoadingResult e - data: undefined; - error: null; - isError: false; -- isLoading: true; -+ isIdle: boolean; -+ isLoading: boolean; - isLoadingError: false; - isRefetchError: false; - isSuccess: false; -@@ -260,6 +262,7 @@ export interface QueryObserverLoadingErrorResult e - data: TData; - error: null; - isError: false; -+ isIdle: false; - isLoading: false; - isLoadingError: false; - isRefetchError: false; -@@ -300,7 +305,8 @@ export interface InfiniteQueryObserverLoadingResult; - error: TError; - isError: true; -+ isIdle: false; - isLoading: false; - isLoadingError: false; - isRefetchError: true; -@@ -330,6 +338,7 @@ export interface InfiniteQueryObserverSuccessResult; - error: null; - isError: false; -+ isIdle: false; - isLoading: false; - isLoadingError: false; - isRefetchError: false; diff --git a/scripts/unit-tests.sh b/scripts/unit-tests.sh index f7d6fb5691..571d9058ad 100755 --- a/scripts/unit-tests.sh +++ b/scripts/unit-tests.sh @@ -1,6 +1,11 @@ #!/bin/bash ANVIL_PORT=8545 +# Automatically export all variables +set -a +source .env +set +a + # Launch anvil in the bg yarn anvil:kill yarn anvil > anvil-unit.log 2>&1 & diff --git a/src/analytics/event.ts b/src/analytics/event.ts index e6e698f34d..b45a6307dd 100644 --- a/src/analytics/event.ts +++ b/src/analytics/event.ts @@ -1,6 +1,6 @@ /* eslint sort-keys: "error"*/ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { KeyboardEventDescription } from '~/entries/popup/hooks/useKeyboardAnalytics'; diff --git a/src/core/keychain/HWSigner.ts b/src/core/keychain/HWSigner.ts index 461a46086f..107db1b864 100644 --- a/src/core/keychain/HWSigner.ts +++ b/src/core/keychain/HWSigner.ts @@ -5,7 +5,7 @@ import { Signer } from '@ethersproject/abstract-signer'; import { Bytes } from '@ethersproject/bytes'; import { defineReadOnly } from '@ethersproject/properties'; import { Provider } from '@ethersproject/providers'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { initializeMessenger } from '../messengers'; @@ -35,8 +35,8 @@ export class HWSigner extends Signer { defineReadOnly(this, 'messenger', popupMessenger); } - async getAddress(): Promise { - return this.address as string; + async getAddress(): Promise
{ + return this.address as Address; } async fwdHWSignRequest(action: string, payload: any): Promise { diff --git a/src/core/keychain/IKeychain.ts b/src/core/keychain/IKeychain.ts index 46844340af..32723e6b16 100644 --- a/src/core/keychain/IKeychain.ts +++ b/src/core/keychain/IKeychain.ts @@ -1,7 +1,7 @@ import { Signer } from '@ethersproject/abstract-signer'; import { Mnemonic } from '@ethersproject/hdnode'; import { Wallet } from '@ethersproject/wallet'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; export type PrivateKey = string; diff --git a/src/core/keychain/KeychainManager.test.ts b/src/core/keychain/KeychainManager.test.ts index 51f5a22e75..425e74a969 100644 --- a/src/core/keychain/KeychainManager.test.ts +++ b/src/core/keychain/KeychainManager.test.ts @@ -6,7 +6,6 @@ import { beforeAll, expect, test } from 'vitest'; import { delay } from '~/test/utils'; import { KeychainType } from '../types/keychainTypes'; -import { createTestWagmiClient } from '../wagmi/createTestWagmiClient'; import { PrivateKey } from './IKeychain'; import { keychainManager } from './KeychainManager'; @@ -15,7 +14,6 @@ let privateKey = ''; let password = ''; beforeAll(async () => { - createTestWagmiClient(); await delay(3000); }); diff --git a/src/core/keychain/KeychainManager.ts b/src/core/keychain/KeychainManager.ts index 62a3a43811..dead23f24b 100644 --- a/src/core/keychain/KeychainManager.ts +++ b/src/core/keychain/KeychainManager.ts @@ -8,7 +8,7 @@ import { importKey, } from '@metamask/browser-passworder'; import * as Sentry from '@sentry/browser'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { LocalStorage, SessionStorage } from '../storage'; import { KeychainType } from '../types/keychainTypes'; diff --git a/src/core/keychain/RainbowSigner.ts b/src/core/keychain/RainbowSigner.ts index 7922bdb4a0..d34416ad80 100644 --- a/src/core/keychain/RainbowSigner.ts +++ b/src/core/keychain/RainbowSigner.ts @@ -12,7 +12,7 @@ import { defineReadOnly } from '@ethersproject/properties'; import { Provider } from '@ethersproject/providers'; import { personalSign } from '@metamask/eth-sig-util'; import { bytesToHex } from 'ethereum-cryptography/utils'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addHexPrefix } from '../utils/hex'; @@ -33,8 +33,8 @@ export class RainbowSigner extends Signer { return Buffer.from(addHexPrefix(this.privateKey).substring(2), 'hex'); }; - async getAddress(): Promise { - return this.address as string; + async getAddress(): Promise
{ + return this.address as Address; } async signMessage(message: Bytes | string): Promise { diff --git a/src/core/keychain/index.test.ts b/src/core/keychain/index.test.ts index 56e0965c10..1e3c251d56 100644 --- a/src/core/keychain/index.test.ts +++ b/src/core/keychain/index.test.ts @@ -9,11 +9,13 @@ import { TypedMessage, recoverTypedSignature, } from '@metamask/eth-sig-util'; +import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; import { delay } from '~/test/utils'; -import { createTestWagmiClient } from '../wagmi/createTestWagmiClient'; +import { connectedToHardhatStore } from '../state/currentSettings/connectedToHardhat'; +import { updateWagmiConfig } from '../wagmi'; import { PrivateKey } from './IKeychain'; @@ -40,7 +42,8 @@ let privateKey = ''; let password = ''; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); }); diff --git a/src/core/keychain/index.ts b/src/core/keychain/index.ts index a9e2b3f3b2..153b84acb1 100644 --- a/src/core/keychain/index.ts +++ b/src/core/keychain/index.ts @@ -11,7 +11,7 @@ import { TypedMessage, signTypedData as signTypedDataSigUtil, } from '@metamask/eth-sig-util'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { SignMessageArguments, diff --git a/src/core/keychain/keychainTypes/hardwareWalletKeychain.ts b/src/core/keychain/keychainTypes/hardwareWalletKeychain.ts index 2452c5eaa3..a8c047190b 100644 --- a/src/core/keychain/keychainTypes/hardwareWalletKeychain.ts +++ b/src/core/keychain/keychainTypes/hardwareWalletKeychain.ts @@ -1,10 +1,10 @@ import { Signer } from '@ethersproject/abstract-signer'; import { Wallet } from '@ethersproject/wallet'; -import { getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { mainnet } from 'viem/chains'; -import { Address } from 'wagmi'; import { KeychainType } from '~/core/types/keychainTypes'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { HWSigner } from '../HWSigner'; import { IKeychain, PrivateKey } from '../IKeychain'; @@ -77,7 +77,9 @@ export class HardwareWalletKeychain implements IKeychain { // eslint-disable-next-line @typescript-eslint/no-unused-vars getSigner(address: Address): Signer { - const provider = getProvider({ chainId: mainnet.id }); + const provider = getProvider({ + chainId: mainnet.id, + }); return new HWSigner( provider, this.getPath(address), diff --git a/src/core/keychain/keychainTypes/hdKeychain.ts b/src/core/keychain/keychainTypes/hdKeychain.ts index aba32314c7..7709059814 100644 --- a/src/core/keychain/keychainTypes/hdKeychain.ts +++ b/src/core/keychain/keychainTypes/hdKeychain.ts @@ -4,12 +4,13 @@ import { BytesLike } from '@ethersproject/bytes'; import { Wallet } from '@ethersproject/wallet'; import * as bip39 from '@scure/bip39'; import { wordlist as englishWordlist } from '@scure/bip39/wordlists/english'; -import { getProvider } from '@wagmi/core'; import { HDKey } from 'ethereum-cryptography/hdkey'; import { bytesToHex } from 'ethereum-cryptography/utils'; -import { Address, mainnet } from 'wagmi'; +import { Address } from 'viem'; +import { mainnet } from 'viem/chains'; import { KeychainType } from '~/core/types/keychainTypes'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { IKeychain, PrivateKey, TWallet } from '../IKeychain'; import { keychainManager } from '../KeychainManager'; @@ -105,6 +106,7 @@ export class HdKeychain implements IKeychain { getSigner(address: Address): Signer { const _privates = privates.get(this)!; + const provider = getProvider({ chainId: mainnet.id }); const wallet = _privates!.getWalletForAddress(address) as TWallet; if (!wallet) throw new Error('Account not found'); diff --git a/src/core/keychain/keychainTypes/keyPairKeychain.ts b/src/core/keychain/keychainTypes/keyPairKeychain.ts index cebbcc5392..366f8dd18e 100644 --- a/src/core/keychain/keychainTypes/keyPairKeychain.ts +++ b/src/core/keychain/keychainTypes/keyPairKeychain.ts @@ -2,10 +2,11 @@ import { Signer } from '@ethersproject/abstract-signer'; import { Mnemonic } from '@ethersproject/hdnode'; import { Wallet } from '@ethersproject/wallet'; -import { getProvider } from '@wagmi/core'; -import { Address, mainnet } from 'wagmi'; +import { Address } from 'viem'; +import { mainnet } from 'viem/chains'; import { KeychainType } from '~/core/types/keychainTypes'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { IKeychain, PrivateKey, TWallet } from '../IKeychain'; import { RainbowSigner } from '../RainbowSigner'; diff --git a/src/core/keychain/keychainTypes/readOnlyKeychain.ts b/src/core/keychain/keychainTypes/readOnlyKeychain.ts index 75542f32d9..31e515d410 100644 --- a/src/core/keychain/keychainTypes/readOnlyKeychain.ts +++ b/src/core/keychain/keychainTypes/readOnlyKeychain.ts @@ -3,7 +3,7 @@ import { Signer } from '@ethersproject/abstract-signer'; import { isAddress } from '@ethersproject/address'; import { Mnemonic } from '@ethersproject/hdnode'; import { Wallet } from '@ethersproject/wallet'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { KeychainType } from '~/core/types/keychainTypes'; import { logger } from '~/logger'; diff --git a/src/core/raps/actions/crosschainSwap.test.ts b/src/core/raps/actions/crosschainSwap.test.ts index 7e5b3403e8..b4d3534b20 100644 --- a/src/core/raps/actions/crosschainSwap.test.ts +++ b/src/core/raps/actions/crosschainSwap.test.ts @@ -6,11 +6,13 @@ import { SwapType, getCrosschainQuote, } from '@rainbow-me/swaps'; -import { getProvider } from '@wagmi/core'; import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; +import { connectedToHardhatStore } from '~/core/state/currentSettings/connectedToHardhat'; import { ChainId } from '~/core/types/chains'; +import { updateWagmiConfig } from '~/core/wagmi'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { TEST_ADDRESS_3, TEST_PK_3, @@ -18,8 +20,6 @@ import { delay, } from '~/test/utils'; -import { createTestWagmiClient } from '../../wagmi/createTestWagmiClient'; - import { estimateCrosschainSwapGasLimit, executeCrosschainSwap, @@ -28,7 +28,8 @@ import { let crosschainQuote: CrosschainQuote | QuoteError | null; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); crosschainQuote = await getCrosschainQuote({ chainId: 1, diff --git a/src/core/raps/actions/crosschainSwap.ts b/src/core/raps/actions/crosschainSwap.ts index 2734fe14a3..bfbc710283 100644 --- a/src/core/raps/actions/crosschainSwap.ts +++ b/src/core/raps/actions/crosschainSwap.ts @@ -1,11 +1,12 @@ import { Signer } from '@ethersproject/abstract-signer'; import { CrosschainQuote, fillCrosschainQuote } from '@rainbow-me/swaps'; -import { Address, getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { REFERRER, gasUnits } from '~/core/references'; import { ChainId } from '~/core/types/chains'; import { NewTransaction, TxHash } from '~/core/types/transactions'; import { addNewTransaction } from '~/core/utils/transactions'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RainbowError, logger } from '~/logger'; import { gasStore } from '../../state'; diff --git a/src/core/raps/actions/swap.test.ts b/src/core/raps/actions/swap.test.ts index 95766a84d4..4bd7ea9840 100644 --- a/src/core/raps/actions/swap.test.ts +++ b/src/core/raps/actions/swap.test.ts @@ -6,20 +6,21 @@ import { SwapType, getQuote, } from '@rainbow-me/swaps'; -import { getProvider } from '@wagmi/core'; import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; +import { connectedToHardhatStore } from '~/core/state/currentSettings/connectedToHardhat'; +import { updateWagmiConfig } from '~/core/wagmi'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { TEST_ADDRESS_2, TEST_PK_2, delay } from '~/test/utils'; -import { createTestWagmiClient } from '../../wagmi/createTestWagmiClient'; - import { estimateSwapGasLimit, executeSwap } from './swap'; let quote: Quote | QuoteError | null; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); quote = await getQuote({ chainId: 1, diff --git a/src/core/raps/actions/swap.ts b/src/core/raps/actions/swap.ts index 3d197059dc..bea453cdc7 100644 --- a/src/core/raps/actions/swap.ts +++ b/src/core/raps/actions/swap.ts @@ -14,7 +14,7 @@ import { unwrapNativeAsset, wrapNativeAsset, } from '@rainbow-me/swaps'; -import { Address, getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { metadataPostClient } from '~/core/graphql'; import { ChainId } from '~/core/types/chains'; @@ -23,6 +23,7 @@ import { add } from '~/core/utils/numbers'; import { isLowerCaseMatch } from '~/core/utils/strings'; import { isUnwrapEth, isWrapEth } from '~/core/utils/swaps'; import { addNewTransaction } from '~/core/utils/transactions'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { TransactionSimulationResponse } from '~/entries/popup/pages/messages/useSimulateTransaction'; import { RainbowError, logger } from '~/logger'; diff --git a/src/core/raps/actions/unlock.test.ts b/src/core/raps/actions/unlock.test.ts index b9b0ff05db..3a5c23771d 100644 --- a/src/core/raps/actions/unlock.test.ts +++ b/src/core/raps/actions/unlock.test.ts @@ -1,9 +1,12 @@ import { Wallet } from '@ethersproject/wallet'; import { getRainbowRouterContractAddress } from '@rainbow-me/swaps'; -import { getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; +import { connectedToHardhatStore } from '~/core/state/currentSettings/connectedToHardhat'; +import { updateWagmiConfig } from '~/core/wagmi'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RAINBOW_WALLET_ADDRESS, TEST_PK_1, @@ -11,8 +14,6 @@ import { delay, } from '~/test/utils'; -import { createTestWagmiClient } from '../../wagmi/createTestWagmiClient'; - import { assetNeedsUnlocking, estimateApprove, @@ -21,14 +22,15 @@ import { } from './unlock'; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); }); test('[rap/unlock] :: get raw allowance', async () => { const rawAllowance = await getAssetRawAllowance({ owner: RAINBOW_WALLET_ADDRESS, - assetAddress: USDC_MAINNET_ASSET.address, + assetAddress: USDC_MAINNET_ASSET.address as Address, spender: getRainbowRouterContractAddress(mainnet.id), chainId: mainnet.id, }); @@ -49,7 +51,7 @@ test('[rap/unlock] :: asset needs unlocking', async () => { test('[rap/unlock] :: estimate approve', async () => { const approveGasLimit = await estimateApprove({ owner: RAINBOW_WALLET_ADDRESS, - tokenAddress: USDC_MAINNET_ASSET.address, + tokenAddress: USDC_MAINNET_ASSET.address as Address, spender: getRainbowRouterContractAddress(mainnet.id), chainId: mainnet.id, }); @@ -60,14 +62,13 @@ test('[rap/unlock] :: should execute approve', async () => { const provider = getProvider({ chainId: mainnet.id }); const wallet = new Wallet(TEST_PK_1, provider); const approvalTx = await executeApprove({ - chainId: mainnet.id, gasLimit: '60000', gasParams: { maxFeePerGas: '800000000000', maxPriorityFeePerGas: '2000000000', }, spender: getRainbowRouterContractAddress(mainnet.id), - tokenAddress: USDC_MAINNET_ASSET.address, + tokenAddress: USDC_MAINNET_ASSET.address as Address, wallet, }); expect(approvalTx.hash).toBeDefined(); diff --git a/src/core/raps/actions/unlock.ts b/src/core/raps/actions/unlock.ts index f4c99a9de9..f9ea1e66e2 100644 --- a/src/core/raps/actions/unlock.ts +++ b/src/core/raps/actions/unlock.ts @@ -2,25 +2,20 @@ import { Signer } from '@ethersproject/abstract-signer'; import { MaxUint256 } from '@ethersproject/constants'; import { Contract, PopulatedTransaction } from '@ethersproject/contracts'; import { parseUnits } from '@ethersproject/units'; -import { - Address, - erc20ABI, - erc721ABI, - getContract, - getProvider, -} from '@wagmi/core'; +import { Address, Hash, erc20Abi, erc721Abi } from 'viem'; +import { gasStore } from '~/core/state'; import { ChainId } from '~/core/types/chains'; import { TransactionGasParams, TransactionLegacyGasParams, } from '~/core/types/gas'; -import { NewTransaction, TxHash } from '~/core/types/transactions'; +import { NewTransaction } from '~/core/types/transactions'; import { addNewTransaction } from '~/core/utils/transactions'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RainbowError, logger } from '~/logger'; import { ETH_ADDRESS, gasUnits } from '../../references'; -import { gasStore } from '../../state'; import { ParsedAsset } from '../../types/assets'; import { convertAmountToRawAmount, @@ -28,8 +23,7 @@ import { toBigNumber, } from '../../utils/numbers'; import { ActionProps, RapActionResult } from '../references'; - -import { overrideWithFastSpeedIfNeeded } from './../utils'; +import { overrideWithFastSpeedIfNeeded } from '../utils'; export const getAssetRawAllowance = async ({ owner, @@ -44,7 +38,7 @@ export const getAssetRawAllowance = async ({ }) => { try { const provider = await getProvider({ chainId }); - const tokenContract = new Contract(assetAddress, erc20ABI, provider); + const tokenContract = new Contract(assetAddress, erc20Abi, provider); const allowance = await tokenContract.allowance(owner, spender); return allowance.toString(); } catch (error) { @@ -96,7 +90,7 @@ export const estimateApprove = async ({ }): Promise => { try { const provider = getProvider({ chainId }); - const tokenContract = new Contract(tokenAddress, erc20ABI, provider); + const tokenContract = new Contract(tokenAddress, erc20Abi, provider); const gasLimit = await tokenContract.estimateGas.approve( spender, MaxUint256, @@ -126,7 +120,7 @@ export const populateApprove = async ({ }): Promise => { try { const provider = getProvider({ chainId }); - const tokenContract = new Contract(tokenAddress, erc20ABI, provider); + const tokenContract = new Contract(tokenAddress, erc20Abi, provider); const approveTransaction = await tokenContract.populateTransaction.approve( spender, MaxUint256, @@ -156,7 +150,7 @@ export const estimateERC721Approval = async ({ }): Promise => { try { const provider = getProvider({ chainId }); - const tokenContract = new Contract(tokenAddress, erc721ABI, provider); + const tokenContract = new Contract(tokenAddress, erc721Abi, provider); const gasLimit = await tokenContract.estimateGas.setApprovalForAll( spender, false, @@ -189,7 +183,7 @@ export const populateRevokeApproval = async ({ }): Promise => { if (!tokenAddress || !spenderAddress || !chainId) return {}; const provider = getProvider({ chainId }); - const tokenContract = new Contract(tokenAddress, erc721ABI, provider); + const tokenContract = new Contract(tokenAddress, erc721Abi, provider); if (type === 'erc20') { const amountToApprove = parseUnits('0', 'ether'); const txObject = await tokenContract.populateTransaction.approve( @@ -207,30 +201,25 @@ export const populateRevokeApproval = async ({ }; export const executeApprove = async ({ - gasLimit, gasParams, + gasLimit, nonce, spender, tokenAddress, wallet, }: { - chainId: ChainId; - gasLimit: string; gasParams: Partial; + gasLimit: string; nonce?: number; spender: Address; tokenAddress: Address; wallet: Signer; }) => { - const tokenContract = getContract({ - address: tokenAddress, - abi: erc20ABI, - signerOrProvider: wallet, - }); - const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = gasParams; - return tokenContract.approve(spender, MaxUint256, { + const tokenContract = new Contract(tokenAddress, erc20Abi, wallet); + + return await tokenContract.approve(spender, MaxUint256, { nonce, gasLimit: toBigNumber(gasLimit), gasPrice: toBigNumber(gasPrice), @@ -278,15 +267,15 @@ export const unlock = async ({ const nonce = baseNonce ? baseNonce + index : undefined; let approval; + try { approval = await executeApprove({ tokenAddress: assetAddress, spender: contractAddress, gasLimit, gasParams, - wallet, nonce, - chainId, + wallet, }); } catch (e) { logger.error(new RainbowError('unlock: error executeApprove'), { @@ -304,8 +293,8 @@ export const unlock = async ({ changes: [], from: parameters.fromAddress, to: assetAddress, - hash: approval.hash as TxHash, - chainId: approval.chainId, + hash: approval.hash as Hash, + chainId: approval.chainId as ChainId, nonce: approval.nonce, status: 'pending', type: 'approve', diff --git a/src/core/raps/references.ts b/src/core/raps/references.ts index 50eb823550..f343c61ce6 100644 --- a/src/core/raps/references.ts +++ b/src/core/raps/references.ts @@ -1,6 +1,6 @@ import { Signer } from '@ethersproject/abstract-signer'; import { CrosschainQuote, Quote } from '@rainbow-me/swaps'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { ParsedAsset } from '../types/assets'; diff --git a/src/core/raps/unlockAndCrosschainSwap.test.ts b/src/core/raps/unlockAndCrosschainSwap.test.ts index 708f987c31..f7a0c5d7f0 100644 --- a/src/core/raps/unlockAndCrosschainSwap.test.ts +++ b/src/core/raps/unlockAndCrosschainSwap.test.ts @@ -1,4 +1,5 @@ import { CrosschainQuote, Quote, QuoteError } from '@rainbow-me/swaps'; +import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; import { @@ -9,7 +10,8 @@ import { delay, } from '~/test/utils'; -import { createTestWagmiClient } from '../wagmi/createTestWagmiClient'; +import { connectedToHardhatStore } from '../state/currentSettings/connectedToHardhat'; +import { updateWagmiConfig } from '../wagmi'; import { createUnlockAndCrosschainSwapRap, @@ -83,7 +85,8 @@ const doesntNeedUnlockQuote: Quote | QuoteError | null = { }; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); }); diff --git a/src/core/raps/unlockAndCrosschainSwap.ts b/src/core/raps/unlockAndCrosschainSwap.ts index f63d28675c..8aa081ce7f 100644 --- a/src/core/raps/unlockAndCrosschainSwap.ts +++ b/src/core/raps/unlockAndCrosschainSwap.ts @@ -5,7 +5,7 @@ import { PermitSupportedTokenList, WRAPPED_ASSET, } from '@rainbow-me/swaps'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { ETH_ADDRESS } from '../references'; import { isNativeAsset } from '../utils/chains'; diff --git a/src/core/raps/unlockAndSwap.test.ts b/src/core/raps/unlockAndSwap.test.ts index d7510dd2f6..6b84d8c003 100644 --- a/src/core/raps/unlockAndSwap.test.ts +++ b/src/core/raps/unlockAndSwap.test.ts @@ -7,7 +7,7 @@ import { SwapType, getQuote, } from '@rainbow-me/swaps'; -import { getProvider } from '@wagmi/core'; +import { mainnet } from 'viem/chains'; import { beforeAll, expect, test } from 'vitest'; import { @@ -21,8 +21,10 @@ import { } from '~/test/utils'; import { gasStore } from '../state'; +import { connectedToHardhatStore } from '../state/currentSettings/connectedToHardhat'; import { GasSpeed } from '../types/gas'; -import { createTestWagmiClient } from '../wagmi/createTestWagmiClient'; +import { updateWagmiConfig } from '../wagmi'; +import { getProvider } from '../wagmi/clientToProvider'; import { walletExecuteRap } from './execute'; import { createUnlockAndSwapRap, estimateUnlockAndSwap } from './unlockAndSwap'; @@ -57,7 +59,8 @@ const SELECTED_GAS = { }; beforeAll(async () => { - createTestWagmiClient(); + connectedToHardhatStore.setState({ connectedToHardhat: true }); + updateWagmiConfig([mainnet]); await delay(3000); doesntNeedUnlockQuote = await getQuote({ chainId: 1, diff --git a/src/core/raps/unlockAndSwap.ts b/src/core/raps/unlockAndSwap.ts index 29bbc26b50..af54be9b75 100644 --- a/src/core/raps/unlockAndSwap.ts +++ b/src/core/raps/unlockAndSwap.ts @@ -5,7 +5,7 @@ import { WRAPPED_ASSET, getRainbowRouterContractAddress, } from '@rainbow-me/swaps'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { ETH_ADDRESS } from '../references'; import { ChainId } from '../types/chains'; diff --git a/src/core/raps/utils.ts b/src/core/raps/utils.ts index 441014b5d6..92e6b0e94f 100644 --- a/src/core/raps/utils.ts +++ b/src/core/raps/utils.ts @@ -9,8 +9,8 @@ import { getQuoteExecutionDetails, getRainbowRouterContractAddress, } from '@rainbow-me/swaps'; +import { erc20Abi } from 'viem'; import { mainnet } from 'viem/chains'; -import { Chain, erc20ABI } from 'wagmi'; import { gasUnits } from '../references'; import { ChainId } from '../types/chains'; @@ -101,7 +101,7 @@ const getStateDiff = async ( quote.swapType === 'normal' ? getRainbowRouterContractAddress(chainId) : (quote as CrosschainQuote).allowanceTarget; - const tokenContract = new Contract(tokenAddress, erc20ABI, provider); + const tokenContract = new Contract(tokenAddress, erc20Abi, provider); const { number: blockNumber } = await ( provider.getBlock as () => Promise @@ -205,7 +205,7 @@ const getClosestGasEstimate = async ( export const getDefaultGasLimitForTrade = ( quote: Quote, - chainId: Chain['id'], + chainId: ChainId, ): string => { const allowsPermit = chainId === mainnet.id && diff --git a/src/core/react-query/queryClient.ts b/src/core/react-query/queryClient.ts index cd622cf1cd..e46ba71589 100644 --- a/src/core/react-query/queryClient.ts +++ b/src/core/react-query/queryClient.ts @@ -7,7 +7,7 @@ import { LocalStorage } from '../storage'; export const queryClient = new QueryClient({ defaultOptions: { queries: { - cacheTime: 1_000 * 60 * 60 * 24, // 24 hours + gcTime: 1_000 * 60 * 60 * 24, // 24 hours networkMode: 'offlineFirst', refetchOnWindowFocus: false, retry: 0, @@ -33,10 +33,7 @@ export const persistOptions: Omit = { shouldDehydrateQuery: (query) => Boolean( // We want to persist queries that have a `cacheTime` of above zero. - query.cacheTime !== 0 && - // We want to persist queries that have `persisterVersion` in their query key. - (query.queryKey[2] as { persisterVersion?: number }) - ?.persisterVersion, + query.gcTime !== 0, ), }, }; diff --git a/src/core/react-query/types.ts b/src/core/react-query/types.ts index 50604bd54a..ae1260ee87 100644 --- a/src/core/react-query/types.ts +++ b/src/core/react-query/types.ts @@ -31,15 +31,7 @@ export type QueryConfig< TQueryKey extends QueryKey, > = Pick< UseQueryOptions, - | 'cacheTime' - | 'enabled' - | 'refetchInterval' - | 'retry' - | 'staleTime' - | 'select' - | 'onError' - | 'onSettled' - | 'onSuccess' + 'gcTime' | 'enabled' | 'refetchInterval' | 'retry' | 'staleTime' | 'select' >; export type InfiniteQueryConfig = Pick< @@ -50,15 +42,7 @@ export type InfiniteQueryConfig = Pick< TQueryFnData, Array >, - | 'cacheTime' - | 'enabled' - | 'refetchInterval' - | 'retry' - | 'staleTime' - | 'select' - | 'onError' - | 'onSettled' - | 'onSuccess' + 'gcTime' | 'enabled' | 'refetchInterval' | 'retry' | 'staleTime' | 'select' >; export type MutationConfig = Pick< diff --git a/src/core/references/index.ts b/src/core/references/index.ts index 3460b3a860..2ac840239c 100644 --- a/src/core/references/index.ts +++ b/src/core/references/index.ts @@ -1,31 +1,30 @@ import { AddressZero } from '@ethersproject/constants'; +import { Address } from 'abitype'; import { + Chain, arbitrum, arbitrumSepolia, avalanche, avalancheFuji, base, baseSepolia, + blast, + blastSepolia, bsc, bscTestnet, + degen, holesky, mainnet, optimism, optimismSepolia, polygon, + polygonAmoy, + sepolia, zora, zoraSepolia, } from 'viem/chains'; -import { Address, type Chain, sepolia } from 'wagmi'; -import { - ChainId, - ChainNameDisplay, - chainBlast, - chainBlastSepolia, - chainDegen, - chainPolygonAmoy, -} from '~/core/types/chains'; +import { ChainId, ChainNameDisplay } from '~/core/types/chains'; import { AddressOrEth } from '../types/assets'; @@ -225,8 +224,8 @@ export const SUPPORTED_MAINNET_CHAINS: Chain[] = [ zora, bsc, avalanche, - chainBlast, - chainDegen, + blast, + degen, ].map((chain) => ({ ...chain, name: ChainNameDisplay[chain.id] })); export const SUPPORTED_CHAINS: Chain[] = [ @@ -246,10 +245,10 @@ export const SUPPORTED_CHAINS: Chain[] = [ zoraSepolia, avalanche, avalancheFuji, - chainBlast, - chainBlastSepolia, - chainPolygonAmoy, - chainDegen, + blast, + blastSepolia, + polygonAmoy, + degen, ].map((chain) => ({ ...chain, name: ChainNameDisplay[chain.id] })); export const SUPPORTED_CHAIN_IDS = SUPPORTED_CHAINS.map((chain) => chain.id); @@ -263,8 +262,8 @@ export const SUPPORTED_TESTNET_CHAINS: Chain[] = [ baseSepolia, zoraSepolia, avalancheFuji, - chainBlastSepolia, - chainPolygonAmoy, + blastSepolia, + polygonAmoy, ]; export const SUPPORTED_TESTNET_CHAIN_IDS: number[] = diff --git a/src/core/resources/_selectors/nfts.ts b/src/core/resources/_selectors/nfts.ts index 6d43a015ed..625b1a2c45 100644 --- a/src/core/resources/_selectors/nfts.ts +++ b/src/core/resources/_selectors/nfts.ts @@ -3,7 +3,7 @@ import { InfiniteData } from '@tanstack/react-query'; import { NftSort } from '~/core/state/nfts'; import { UniqueAsset } from '~/core/types/nfts'; -type NFTInfiniteData = InfiniteData<{ +export type NFTInfiniteData = InfiniteData<{ nfts: UniqueAsset[]; nextPage?: string | null; }>; diff --git a/src/core/resources/_template/_templateMutation.ts b/src/core/resources/_template/_templateMutation.ts index 05ce5f0aeb..3a71818825 100644 --- a/src/core/resources/_template/_templateMutation.ts +++ b/src/core/resources/_template/_templateMutation.ts @@ -47,9 +47,9 @@ export function useTemplateMutation( TemplateMutationArgs > = {}, ) { - return useMutation( - ['templateMutation'], - templateMutationMutationFunction, - mutationConfig, - ); + return useMutation({ + mutationKey: ['templateMutation'], + mutationFn: templateMutationMutationFunction, + ...mutationConfig, + }); } diff --git a/src/core/resources/_template/_templateQuery.ts b/src/core/resources/_template/_templateQuery.ts index 987fdd4fac..38fc1c9fc4 100644 --- a/src/core/resources/_template/_templateQuery.ts +++ b/src/core/resources/_template/_templateQuery.ts @@ -74,11 +74,11 @@ export async function prefetchTemplateResource( TemplateResourceQueryKey > = {}, ) { - return await queryClient.prefetchQuery( - templateResourceQueryKey({ foo, bar, baz }), - templateResourceQueryFunction, - config, - ); + return await queryClient.prefetchQuery({ + queryKey: templateResourceQueryKey({ foo, bar, baz }), + queryFn: templateResourceQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -93,11 +93,11 @@ export async function fetchTemplateResource( TemplateResourceQueryKey > = {}, ) { - return await queryClient.fetchQuery( - templateResourceQueryKey({ foo, bar, baz }), - templateResourceQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: templateResourceQueryKey({ foo, bar, baz }), + queryFn: templateResourceQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -112,9 +112,9 @@ export function useTemplateResource( TemplateResourceQueryKey > = {}, ) { - return useQuery( - templateResourceQueryKey({ foo, bar, baz }), - templateResourceQueryFunction, - config, - ); + return useQuery({ + queryKey: templateResourceQueryKey({ foo, bar, baz }), + queryFn: templateResourceQueryFunction, + ...config, + }); } diff --git a/src/core/resources/addys/addysSummary.ts b/src/core/resources/addys/addysSummary.ts index 400d252813..09e0e64258 100644 --- a/src/core/resources/addys/addysSummary.ts +++ b/src/core/resources/addys/addysSummary.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -105,12 +105,10 @@ export function useAddysSummary( AddysSummaryQueryKey > = {}, ) { - return useQuery( - addysSummaryQueryKey({ addresses, currency }), - addysSummaryQueryFunction, - { - ...config, - retry: true, - }, - ); + return useQuery({ + queryKey: addysSummaryQueryKey({ addresses, currency }), + queryFn: addysSummaryQueryFunction, + ...config, + retry: true, + }); } diff --git a/src/core/resources/approvals/approvals.ts b/src/core/resources/approvals/approvals.ts index 917db47f18..816d68e1e4 100644 --- a/src/core/resources/approvals/approvals.ts +++ b/src/core/resources/approvals/approvals.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -112,11 +112,11 @@ export async function fetchApprovals( AprovalsQueryKey > = {}, ) { - return await queryClient.fetchQuery( - approvalsQueryKey({ address, chainIds, currency }), - approvalsQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: approvalsQueryKey({ address, chainIds, currency }), + queryFn: approvalsQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -131,9 +131,9 @@ export function useApprovals( AprovalsQueryKey > = {}, ) { - return useQuery( - approvalsQueryKey({ address, chainIds, currency }), - approvalsQueryFunction, - config, - ); + return useQuery({ + queryKey: approvalsQueryKey({ address, chainIds, currency }), + queryFn: approvalsQueryFunction, + ...config, + }); } diff --git a/src/core/resources/assets/assetMetadata.ts b/src/core/resources/assets/assetMetadata.ts index d925e487e2..9fb68c7266 100644 --- a/src/core/resources/assets/assetMetadata.ts +++ b/src/core/resources/assets/assetMetadata.ts @@ -1,7 +1,6 @@ import { isValidAddress } from '@ethereumjs/util'; import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { QueryConfig, @@ -41,10 +40,9 @@ async function assetMetadataQueryFunction({ queryKey: [{ assetAddress, chainId }], }: QueryFunctionArgs) { if (assetAddress && isValidAddress(assetAddress)) { - const provider = getProvider({ chainId: Number(chainId) }); const metadata = await getAssetMetadata({ address: assetAddress, - provider, + chainId: Number(chainId), }); return { address: assetAddress, @@ -71,14 +69,12 @@ export function useAssetMetadata( AssetMetadataQueryKey > = {}, ) { - return useQuery( - assetMetadataQueryKey({ + return useQuery({ + queryKey: assetMetadataQueryKey({ assetAddress, chainId, }), - assetMetadataQueryFunction, - { - ...config, - }, - ); + queryFn: assetMetadataQueryFunction, + ...config, + }); } diff --git a/src/core/resources/assets/assets.ts b/src/core/resources/assets/assets.ts index a68e9586b3..3d63da17da 100644 --- a/src/core/resources/assets/assets.ts +++ b/src/core/resources/assets/assets.ts @@ -89,11 +89,11 @@ export async function fetchAssets( AssetsQueryKey > = {}, ) { - return await queryClient.fetchQuery( - assetsQueryKey({ assets, currency }), - assetsQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: assetsQueryKey({ assets, currency }), + queryFn: assetsQueryFunction, + ...config, + }); } function parseAssets( @@ -134,7 +134,9 @@ export function useAssets( AssetsQueryKey > = {}, ) { - return useQuery(assetsQueryKey({ assets, currency }), assetsQueryFunction, { + return useQuery({ + queryKey: assetsQueryKey({ assets, currency }), + queryFn: assetsQueryFunction, ...config, refetchInterval: ASSETS_REFETCH_INTERVAL, }); diff --git a/src/core/resources/assets/common.ts b/src/core/resources/assets/common.ts index f455041776..c93148ac57 100644 --- a/src/core/resources/assets/common.ts +++ b/src/core/resources/assets/common.ts @@ -1,5 +1,4 @@ -import { getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { createQueryKey } from '~/core/react-query'; import { SupportedCurrencyKey } from '~/core/references'; @@ -15,6 +14,7 @@ import { parseUserAsset, } from '~/core/utils/assets'; import { greaterThan } from '~/core/utils/numbers'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { DAI_MAINNET_ASSET, ETH_MAINNET_ASSET, @@ -88,8 +88,6 @@ export async function parseUserAssets({ ? ETH_MAINNET_ASSET : OPTIMISM_MAINNET_ASSET; - const provider = getProvider({ chainId: selectedHardhatChainId }); - // Ensure assets are checked if connected to hardhat const assets = parsedAssetsDict[mainnetOrOptimismChainId]; assets[ethereumOrOptimismAsset.uniqueId] = ethereumOrOptimismAsset; @@ -100,7 +98,7 @@ export async function parseUserAssets({ const balanceRequests = Object.values(assets).map(async (asset) => { if (asset.chainId !== mainnetOrOptimismChainId) return asset; - + const provider = getProvider({ chainId: selectedHardhatChainId }); try { const parsedAsset = await fetchAssetBalanceViaProvider({ parsedAsset: asset, diff --git a/src/core/resources/assets/customNetworkAssets.ts b/src/core/resources/assets/customNetworkAssets.ts index 9f064328dd..60de6a9b23 100644 --- a/src/core/resources/assets/customNetworkAssets.ts +++ b/src/core/resources/assets/customNetworkAssets.ts @@ -1,7 +1,6 @@ import { AddressZero } from '@ethersproject/constants'; import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { requestMetadata } from '~/core/graphql'; import { @@ -36,8 +35,9 @@ import { parseAssetMetadata, parseUserAssetBalances, } from '~/core/utils/assets'; -import { getRainbowChains } from '~/core/utils/chains'; import { convertDecimalFormatToRawAmount, isZero } from '~/core/utils/numbers'; +import { getRainbowChains } from '~/core/utils/rainbowChains'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RainbowError, logger } from '~/logger'; import { ASSETS_TIMEOUT_DURATION } from './assets'; @@ -116,16 +116,16 @@ export const CustomNetworkAssetsFetchQuery = ({ filterZeroBalance, rainbowChainAssets, }: FetchCustomNetworkAssetsArgs) => { - queryClient.fetchQuery( - customNetworkAssetsKey({ + queryClient.fetchQuery({ + queryKey: customNetworkAssetsKey({ address, currency, testnetMode, filterZeroBalance, rainbowChainAssets, }), - customNetworkAssetsFunction, - ); + queryFn: customNetworkAssetsFunction, + }); }; export const CustomNetworkAssetsSetQueryDefaults = ({ @@ -176,15 +176,15 @@ async function customNetworkAssetsFunction({ ], }: QueryFunctionArgs) { const cache = queryClient.getQueryCache(); - const cachedCustomNetworkAssets = (cache.find( - customNetworkAssetsKey({ + const cachedCustomNetworkAssets = (cache.find({ + queryKey: customNetworkAssetsKey({ address, currency, testnetMode, filterZeroBalance, rainbowChainAssets, }), - )?.state?.data || {}) as Record; + })?.state?.data || {}) as Record; const { rainbowChains: chains } = getRainbowChains(); @@ -235,7 +235,7 @@ async function customNetworkAssetsFunction({ getAssetBalance({ assetAddress: asset.address, currentAddress: address, - provider, + chainId: chain.id, }), ), ); @@ -360,19 +360,17 @@ export function useCustomNetworkAssets< ) { const { testnetMode } = useTestnetModeStore(); const { rainbowChainAssets } = useRainbowChainAssetsStore(); - return useQuery( - customNetworkAssetsKey({ + return useQuery({ + queryKey: customNetworkAssetsKey({ address, currency, testnetMode, filterZeroBalance, rainbowChainAssets, }), - customNetworkAssetsFunction, - { - ...config, - refetchInterval: CUSTOM_NETWORK_ASSETS_REFETCH_INTERVAL, - staleTime: process.env.IS_TESTING === 'true' ? 0 : 1000, - }, - ); + queryFn: customNetworkAssetsFunction, + ...config, + refetchInterval: CUSTOM_NETWORK_ASSETS_REFETCH_INTERVAL, + staleTime: process.env.IS_TESTING === 'true' ? 0 : 1000, + }); } diff --git a/src/core/resources/assets/userAssets.ts b/src/core/resources/assets/userAssets.ts index 4e0965f2b6..883057a26e 100644 --- a/src/core/resources/assets/userAssets.ts +++ b/src/core/resources/assets/userAssets.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -76,10 +76,10 @@ export const userAssetsFetchQuery = ({ currency, testnetMode, }: FetchUserAssetsArgs) => { - queryClient.fetchQuery( - userAssetsQueryKey({ address, currency, testnetMode }), - userAssetsQueryFunction, - ); + queryClient.fetchQuery({ + queryKey: userAssetsQueryKey({ address, currency, testnetMode }), + queryFn: userAssetsQueryFunction, + }); }; export const userAssetsSetQueryDefaults = ({ @@ -112,9 +112,9 @@ async function userAssetsQueryFunction({ queryKey: [{ address, currency, testnetMode }], }: QueryFunctionArgs) { const cache = queryClient.getQueryCache(); - const cachedUserAssets = (cache.find( - userAssetsQueryKey({ address, currency, testnetMode }), - )?.state?.data || {}) as ParsedAssetsDictByChain; + const cachedUserAssets = (cache.find({ + queryKey: userAssetsQueryKey({ address, currency, testnetMode }), + })?.state?.data || {}) as ParsedAssetsDictByChain; try { const supportedChainIds = getBackendSupportedChains({ testnetMode }).map( ({ id }) => id, @@ -178,8 +178,9 @@ async function userAssetsQueryFunctionRetryByChain({ try { const cache = queryClient.getQueryCache(); const cachedUserAssets = - (cache.find(userAssetsQueryKey({ address, currency, testnetMode }))?.state - ?.data as ParsedAssetsDictByChain) || {}; + (cache.find({ + queryKey: userAssetsQueryKey({ address, currency, testnetMode }), + })?.state?.data as ParsedAssetsDictByChain) || {}; const retries = []; for (const chainIdWithError of chainIds) { retries.push( @@ -189,7 +190,7 @@ async function userAssetsQueryFunctionRetryByChain({ chainId: chainIdWithError, currency, }, - { cacheTime: 0 }, + { gcTime: 0 }, ), ); } @@ -224,15 +225,14 @@ export function useUserAssets( > = {}, ) { const { testnetMode } = useTestnetModeStore(); - return useQuery( - userAssetsQueryKey({ address, currency, testnetMode }), - userAssetsQueryFunction, - { - ...config, - refetchInterval: USER_ASSETS_REFETCH_INTERVAL, - staleTime: process.env.IS_TESTING === 'true' ? 0 : 1000, - }, - ); + return useQuery({ + queryKey: userAssetsQueryKey({ address, currency, testnetMode }), + queryFn: userAssetsQueryFunction, + ...config, + refetchInterval: USER_ASSETS_REFETCH_INTERVAL, + staleTime: process.env.IS_TESTING === 'true' ? 0 : 1000, + placeholderData: (previousData) => previousData, + }); } // /////////////////////////////////////////////// @@ -274,15 +274,15 @@ export async function fetchUserAssetsByChain< UserAssetsByChainQueryKey > = {}, ) { - return await queryClient.fetchQuery( - userAssetsByChainQueryKey({ + return await queryClient.fetchQuery({ + queryKey: userAssetsByChainQueryKey({ address, chainId, currency, }), - userAssetsByChainQueryFunction, - config, - ); + queryFn: userAssetsByChainQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -294,9 +294,9 @@ export async function userAssetsByChainQueryFunction({ Record > { const cache = queryClient.getQueryCache(); - const cachedUserAssets = (cache.find( - userAssetsQueryKey({ address, currency }), - )?.state?.data || {}) as ParsedAssetsDictByChain; + const cachedUserAssets = (cache.find({ + queryKey: userAssetsQueryKey({ address, currency }), + })?.state?.data || {}) as ParsedAssetsDictByChain; const cachedDataForChain = cachedUserAssets?.[chainId]; try { const url = `/${chainId}/${address}/assets/?currency=${currency.toLowerCase()}`; @@ -344,16 +344,14 @@ export function useUserAssetsByChain( UserAssetsByChainQueryKey > = {}, ) { - return useQuery( - userAssetsByChainQueryKey({ + return useQuery({ + queryKey: userAssetsByChainQueryKey({ address, chainId, currency, }), - userAssetsByChainQueryFunction, - { - ...config, - refetchInterval: USER_ASSETS_REFETCH_INTERVAL, - }, - ); + queryFn: userAssetsByChainQueryFunction, + ...config, + refetchInterval: USER_ASSETS_REFETCH_INTERVAL, + }); } diff --git a/src/core/resources/assets/userAssetsByChain.ts b/src/core/resources/assets/userAssetsByChain.ts index 0eca444c8f..58549ae786 100644 --- a/src/core/resources/assets/userAssetsByChain.ts +++ b/src/core/resources/assets/userAssetsByChain.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -59,15 +59,15 @@ export async function fetchUserAssetsByChain< UserAssetsByChainQueryKey > = {}, ) { - return await queryClient.fetchQuery( - userAssetsByChainQueryKey({ + return await queryClient.fetchQuery({ + queryKey: userAssetsByChainQueryKey({ address, chainId, currency, }), - userAssetsByChainQueryFunction, - config, - ); + queryFn: userAssetsByChainQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -79,9 +79,9 @@ export async function userAssetsByChainQueryFunction({ Record > { const cache = queryClient.getQueryCache(); - const cachedUserAssets = (cache.find( - userAssetsQueryKey({ address, currency }), - )?.state?.data || {}) as ParsedAssetsDictByChain; + const cachedUserAssets = (cache.find({ + queryKey: userAssetsQueryKey({ address, currency }), + })?.state?.data || {}) as ParsedAssetsDictByChain; const cachedDataForChain = cachedUserAssets?.[chainId]; try { const url = `/${chainId}/${address}/assets/?currency=${currency.toLowerCase()}`; @@ -129,16 +129,14 @@ export function useUserAssetsByChain( UserAssetsByChainQueryKey > = {}, ) { - return useQuery( - userAssetsByChainQueryKey({ + return useQuery({ + queryKey: userAssetsByChainQueryKey({ address, chainId, currency, }), - userAssetsByChainQueryFunction, - { - ...config, - refetchInterval: USER_ASSETS_REFETCH_INTERVAL, - }, - ); + queryFn: userAssetsByChainQueryFunction, + ...config, + refetchInterval: USER_ASSETS_REFETCH_INTERVAL, + }); } diff --git a/src/core/resources/assets/userTestnetNativeAsset.ts b/src/core/resources/assets/userTestnetNativeAsset.ts index 27ff9e530b..6d9f8ceb60 100644 --- a/src/core/resources/assets/userTestnetNativeAsset.ts +++ b/src/core/resources/assets/userTestnetNativeAsset.ts @@ -1,6 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { QueryConfig, @@ -16,6 +15,7 @@ import { ParsedUserAsset } from '~/core/types/assets'; import { ChainId, ChainName, ChainNameDisplay } from '~/core/types/chains'; import { fetchAssetBalanceViaProvider } from '~/core/utils/assets'; import { getChain, isTestnetChainId } from '~/core/utils/chains'; +import { getProvider } from '~/core/wagmi/clientToProvider'; const USER_ASSETS_REFETCH_INTERVAL = 60000; @@ -85,11 +85,12 @@ async function userTestnetNativeAssetQueryFunction({ !isTestnetChainId({ chainId }) && chainId !== ChainId.hardhat && chainId !== ChainId.hardhatOptimism - ) + ) { return null; + } - const provider = getProvider({ chainId }); const nativeAsset = getNativeAssetMock({ chainId }); + const provider = getProvider({ chainId }); const parsedAsset = await fetchAssetBalanceViaProvider({ parsedAsset: nativeAsset, currentAddress: address, @@ -118,16 +119,14 @@ export function useUserTestnetNativeAsset( UserTestnetNativeAssetQueryKey > = {}, ) { - return useQuery( - userTestnetNativeAssetQueryKey({ + return useQuery({ + queryKey: userTestnetNativeAssetQueryKey({ address, currency, chainId, }), - userTestnetNativeAssetQueryFunction, - { - ...config, - refetchInterval: USER_ASSETS_REFETCH_INTERVAL, - }, - ); + queryFn: userTestnetNativeAssetQueryFunction, + ...config, + refetchInterval: USER_ASSETS_REFETCH_INTERVAL, + }); } diff --git a/src/core/resources/chains/chainMetadata.ts b/src/core/resources/chains/chainMetadata.ts index 6bfce73129..92ea386d07 100644 --- a/src/core/resources/chains/chainMetadata.ts +++ b/src/core/resources/chains/chainMetadata.ts @@ -57,13 +57,11 @@ export function useChainMetadata( AssetMetadataQueryKey > = {}, ) { - return useQuery( - chainMetadataQueryKey({ + return useQuery({ + queryKey: chainMetadataQueryKey({ rpcUrl, }), - chainMetadataQueryFunction, - { - ...config, - }, - ); + queryFn: chainMetadataQueryFunction, + ...config, + }); } diff --git a/src/core/resources/ens/ensRegistration.ts b/src/core/resources/ens/ensRegistration.ts index 0cf3c02381..882ba92959 100644 --- a/src/core/resources/ens/ensRegistration.ts +++ b/src/core/resources/ens/ensRegistration.ts @@ -103,9 +103,9 @@ export function useEnsRegistration( EnsRegistrationQueryKey > = {}, ) { - return useQuery( - ensRegistrationQueryKey({ name }), - ensRegistrationQueryFunction, - config, - ); + return useQuery({ + queryKey: ensRegistrationQueryKey({ name }), + queryFn: ensRegistrationQueryFunction, + ...config, + }); } diff --git a/src/core/resources/f2c/providers.ts b/src/core/resources/f2c/providers.ts index 749dc8c516..d22bd4d73a 100644 --- a/src/core/resources/f2c/providers.ts +++ b/src/core/resources/f2c/providers.ts @@ -3,7 +3,6 @@ import { useQuery } from '@tanstack/react-query'; import { f2cHttp } from '~/core/network'; import { QueryConfig, - QueryFunctionArgs, QueryFunctionResult, createQueryKey, queryClient, @@ -14,8 +13,6 @@ import { ProviderConfig } from './types'; // /////////////////////////////////////////////// // Query Types -export type ProvidersListArgs = {}; - // /////////////////////////////////////////////// // Query Key @@ -27,9 +24,7 @@ type ProvidersListQueryKey = ReturnType; // /////////////////////////////////////////////// // Query Function -async function providersListQueryFunction({ - queryKey: [], -}: QueryFunctionArgs) { +async function providersListQueryFunction() { const parsedResponse = await f2cHttp.get<{ providers: ProviderConfig[]; }>('/v1/providers/list'); @@ -44,7 +39,6 @@ type ProvidersListResult = QueryFunctionResult< // Query Fetcher export async function fetchProvidersList( - {}: ProvidersListArgs, config: QueryConfig< ProvidersListResult, Error, @@ -52,11 +46,11 @@ export async function fetchProvidersList( ProvidersListQueryKey > = {}, ) { - return await queryClient.fetchQuery( - providersListQueryKey(), - providersListQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: providersListQueryKey(), + queryFn: providersListQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -70,5 +64,9 @@ export function useProvidersList( ProvidersListQueryKey > = {}, ) { - return useQuery(providersListQueryKey(), providersListQueryFunction, config); + return useQuery({ + queryKey: providersListQueryKey(), + queryFn: providersListQueryFunction, + ...config, + }); } diff --git a/src/core/resources/f2c/widgetUrl.ts b/src/core/resources/f2c/widgetUrl.ts index acf2c3b584..8ae6af2920 100644 --- a/src/core/resources/f2c/widgetUrl.ts +++ b/src/core/resources/f2c/widgetUrl.ts @@ -1,5 +1,5 @@ import qs from 'qs'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { f2cHttp } from '~/core/network'; import { @@ -76,14 +76,14 @@ export async function fetchProviderWidgetUrl( ProviderWidgetUrlQueryKey > = {}, ) { - return await queryClient.fetchQuery( - providerWidgetUrlQueryKey({ + return await queryClient.fetchQuery({ + queryKey: providerWidgetUrlQueryKey({ provider, depositAddress, defaultExperience, redirectUri, }), - providerWidgetUrlQueryFunction, - config, - ); + queryFn: providerWidgetUrlQueryFunction, + ...config, + }); } diff --git a/src/core/resources/gas/estimateApprovalGasLimit.ts b/src/core/resources/gas/estimateApprovalGasLimit.ts index d71f671152..2b39793ea8 100644 --- a/src/core/resources/gas/estimateApprovalGasLimit.ts +++ b/src/core/resources/gas/estimateApprovalGasLimit.ts @@ -94,17 +94,17 @@ export async function fetchEstimateSwapGasLimit( EstimateApprovalGasLimitQueryKey > = {}, ) { - return await queryClient.fetchQuery( - estimateApprovalGasLimitQueryKey({ + return await queryClient.fetchQuery({ + queryKey: estimateApprovalGasLimitQueryKey({ chainId, ownerAddress, assetAddress, spenderAddress, assetType, }), - estimateApprovalGasLimitQueryFunction, - config, - ); + queryFn: estimateApprovalGasLimitQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -125,15 +125,16 @@ export function useEstimateApprovalGasLimit( EstimateApprovalGasLimitQueryKey > = {}, ) { - return useQuery( - estimateApprovalGasLimitQueryKey({ + return useQuery({ + queryKey: estimateApprovalGasLimitQueryKey({ chainId, ownerAddress, assetAddress, spenderAddress, assetType, }), - estimateApprovalGasLimitQueryFunction, - { keepPreviousData: true, ...config }, - ); + queryFn: estimateApprovalGasLimitQueryFunction, + ...config, + placeholderData: (previousData) => previousData, + }); } diff --git a/src/core/resources/gas/estimateGasLimit.ts b/src/core/resources/gas/estimateGasLimit.ts index d0ad40b818..b286850e9b 100644 --- a/src/core/resources/gas/estimateGasLimit.ts +++ b/src/core/resources/gas/estimateGasLimit.ts @@ -1,6 +1,5 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; import { QueryConfig, @@ -12,6 +11,7 @@ import { import { gasUnits } from '~/core/references/gasUnits'; import { ChainId } from '~/core/types/chains'; import { estimateGas } from '~/core/utils/gas'; +import { getProvider } from '~/core/wagmi/clientToProvider'; // /////////////////////////////////////////////// // Query Types @@ -79,11 +79,11 @@ export async function fetchEstimateGasLimit( EstimateGasLimitQueryKey > = {}, ) { - return await queryClient.fetchQuery( - estimateGasLimitQueryKey({ chainId, transactionRequest }), - estimateGasLimitQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: estimateGasLimitQueryKey({ chainId, transactionRequest }), + queryFn: estimateGasLimitQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -98,9 +98,10 @@ export function useEstimateGasLimit( EstimateGasLimitQueryKey > = {}, ) { - return useQuery( - estimateGasLimitQueryKey({ chainId, transactionRequest }), - estimateGasLimitQueryFunction, - { keepPreviousData: true, ...config }, - ); + return useQuery({ + queryKey: estimateGasLimitQueryKey({ chainId, transactionRequest }), + queryFn: estimateGasLimitQueryFunction, + ...config, + placeholderData: (previousData) => previousData, + }); } diff --git a/src/core/resources/gas/estimateSwapGasLimit.ts b/src/core/resources/gas/estimateSwapGasLimit.ts index fa771d4baf..642c2dc09b 100644 --- a/src/core/resources/gas/estimateSwapGasLimit.ts +++ b/src/core/resources/gas/estimateSwapGasLimit.ts @@ -101,16 +101,16 @@ export async function fetchEstimateSwapGasLimit( EstimateSwapGasLimitQueryKey > = {}, ) { - return await queryClient.fetchQuery( - estimateSwapGasLimitQueryKey({ + return await queryClient.fetchQuery({ + queryKey: estimateSwapGasLimitQueryKey({ chainId, quote, assetToSell, assetToBuy, }), - estimateSwapGasLimitQueryFunction, - config, - ); + queryFn: estimateSwapGasLimitQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -125,14 +125,15 @@ export function useEstimateSwapGasLimit( EstimateSwapGasLimitQueryKey > = {}, ) { - return useQuery( - estimateSwapGasLimitQueryKey({ + return useQuery({ + queryKey: estimateSwapGasLimitQueryKey({ chainId, quote, assetToSell, assetToBuy, }), - estimateSwapGasLimitQueryFunction, - { keepPreviousData: true, ...config }, - ); + queryFn: estimateSwapGasLimitQueryFunction, + ...config, + placeholderData: (previousData) => previousData, + }); } diff --git a/src/core/resources/gas/meteorology.ts b/src/core/resources/gas/meteorology.ts index e559340990..8b4fd6467c 100644 --- a/src/core/resources/gas/meteorology.ts +++ b/src/core/resources/gas/meteorology.ts @@ -124,11 +124,11 @@ export async function fetchMeteorology( MeteorologyQueryKey > = {}, ) { - return await queryClient.fetchQuery( - meteorologyQueryKey({ chainId }), - meteorologyQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: meteorologyQueryKey({ chainId }), + queryFn: meteorologyQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -143,9 +143,9 @@ export function useMeteorology( MeteorologyQueryKey > = {}, ) { - return useQuery( - meteorologyQueryKey({ chainId }), - meteorologyQueryFunction, - config, - ); + return useQuery({ + queryKey: meteorologyQueryKey({ chainId }), + queryFn: meteorologyQueryFunction, + ...config, + }); } diff --git a/src/core/resources/gas/optimismL1SecurityFee.ts b/src/core/resources/gas/optimismL1SecurityFee.ts index bfdd517fec..a747f7e7a2 100644 --- a/src/core/resources/gas/optimismL1SecurityFee.ts +++ b/src/core/resources/gas/optimismL1SecurityFee.ts @@ -1,6 +1,5 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; import { QueryConfig, @@ -14,6 +13,7 @@ import { calculateL1FeeOptimism, chainNeedsL1SecurityFee, } from '~/core/utils/gas'; +import { getProvider } from '~/core/wagmi/clientToProvider'; // /////////////////////////////////////////////// // Query Types @@ -81,11 +81,11 @@ export async function fetchOptimismL1SecurityFee( OptimismL1SecurityFeeQueryKey > = {}, ) { - return await queryClient.fetchQuery( - optimismL1SecurityFeeQueryKey({ transactionRequest, chainId }), - optimismL1SecurityFeeQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: optimismL1SecurityFeeQueryKey({ transactionRequest, chainId }), + queryFn: optimismL1SecurityFeeQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -100,12 +100,11 @@ export function useOptimismL1SecurityFee( OptimismL1SecurityFeeQueryKey > = {}, ) { - return useQuery( - optimismL1SecurityFeeQueryKey({ transactionRequest, chainId }), - optimismL1SecurityFeeQueryFunction, - { - keepPreviousData: chainNeedsL1SecurityFee(chainId), - ...config, - }, - ); + return useQuery({ + queryKey: optimismL1SecurityFeeQueryKey({ transactionRequest, chainId }), + queryFn: optimismL1SecurityFeeQueryFunction, + ...config, + placeholderData: (previousData) => + chainNeedsL1SecurityFee(chainId) ? previousData : null, + }); } diff --git a/src/core/resources/gas/providerGas.ts b/src/core/resources/gas/providerGas.ts index 67cc3aa69b..536db2badd 100644 --- a/src/core/resources/gas/providerGas.ts +++ b/src/core/resources/gas/providerGas.ts @@ -1,6 +1,4 @@ import { useQuery } from '@tanstack/react-query'; -import { getProvider } from '@wagmi/core'; -import { Chain } from 'wagmi'; import { QueryConfig, @@ -9,7 +7,9 @@ import { createQueryKey, queryClient, } from '~/core/react-query'; +import { ChainId } from '~/core/types/chains'; import { weiToGwei } from '~/core/utils/ethereum'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { MeteorologyLegacyResponse } from './meteorology'; @@ -17,7 +17,7 @@ import { MeteorologyLegacyResponse } from './meteorology'; // Query Types export type ProviderGasArgs = { - chainId: Chain['id']; + chainId: ChainId; }; // /////////////////////////////////////////////// @@ -70,11 +70,11 @@ export async function getProviderGas( ProviderGasQueryKey > = {}, ) { - return await queryClient.fetchQuery( - providerGasQueryKey({ chainId }), - providerGasQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: providerGasQueryKey({ chainId }), + queryFn: providerGasQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -89,9 +89,9 @@ export function useProviderGas( ProviderGasQueryKey > = {}, ) { - return useQuery( - providerGasQueryKey({ chainId }), - providerGasQueryFunction, - config, - ); + return useQuery({ + queryKey: providerGasQueryKey({ chainId }), + queryFn: providerGasQueryFunction, + ...config, + }); } diff --git a/src/core/resources/metadata/dapp.ts b/src/core/resources/metadata/dapp.ts index f41a1ee1dd..95b559050b 100644 --- a/src/core/resources/metadata/dapp.ts +++ b/src/core/resources/metadata/dapp.ts @@ -100,13 +100,11 @@ export async function prefetchDappMetadata({ url }: { url: string }) { const { dappMetadata } = dappMetadataStore.getState(); const appHost = url && isValidUrl(url) ? getDappHost(url) : ''; if (!dappMetadata[appHost]) { - queryClient.prefetchQuery( - DappMetadataQueryKey({ url }), - async () => fetchDappMetadata({ url, status: false }), - { - staleTime: 60000, - }, - ); + queryClient.prefetchQuery({ + queryKey: DappMetadataQueryKey({ url }), + queryFn: () => fetchDappMetadata({ url, status: false }), + staleTime: 60000, + }); } } @@ -114,8 +112,10 @@ export async function prefetchDappMetadata({ url }: { url: string }) { // Query Hook export function useDappMetadata({ url }: DappMetadataArgs) { - return useQuery(DappMetadataQueryKey({ url }), dappMetadataQueryFunction, { - cacheTime: 1000 * 60 * 60 * 24, + return useQuery({ + queryKey: DappMetadataQueryKey({ url }), + queryFn: dappMetadataQueryFunction, + gcTime: 1000 * 60 * 60 * 24, initialData: () => { const appHost = url && isValidUrl(url) ? getDappHost(url) : ''; const { getDappMetadata } = dappMetadataStore.getState(); diff --git a/src/core/resources/metadata/ensAvatar.ts b/src/core/resources/metadata/ensAvatar.ts index 7c0121484d..530e888b78 100644 --- a/src/core/resources/metadata/ensAvatar.ts +++ b/src/core/resources/metadata/ensAvatar.ts @@ -68,7 +68,7 @@ export const resolveEnsAvatar = ({ }) => { if (!addressOrName) return null; return isAddress(addressOrName) - ? reverseResolve(addressOrName) + ? reverseResolve(addressOrName as Address) : resolve(addressOrName); }; @@ -82,11 +82,9 @@ export async function resolveEnsProfileQueryFunction({ // Query Hook export function useENSAvatar({ addressOrName }: ResolveEnsProfileArgs) { - return useQuery( - ResolveEnsProfileQueryKey({ addressOrName }), - resolveEnsProfileQueryFunction, - { - staleTime: 10 * 60 * 1_000, // 10 min - }, - ); + return useQuery({ + queryKey: ResolveEnsProfileQueryKey({ addressOrName }), + queryFn: resolveEnsProfileQueryFunction, + staleTime: 10 * 60 * 1_000, // 10 min + }); } diff --git a/src/core/resources/metadata/ensProfile.ts b/src/core/resources/metadata/ensProfile.ts index aec067fd38..35ebc2626a 100644 --- a/src/core/resources/metadata/ensProfile.ts +++ b/src/core/resources/metadata/ensProfile.ts @@ -110,7 +110,7 @@ export const fetchEnsProfile = ({ }) => { if (!addressOrName) return null; return isAddress(addressOrName) - ? reverseResolveEnsProfile(addressOrName) + ? reverseResolveEnsProfile(addressOrName as Address) : resolveEnsProfile(addressOrName); }; @@ -134,12 +134,10 @@ export function useENSProfile( EnsProfileQueryKey > = {}, ) { - return useQuery( - EnsProfileQueryKey({ addressOrName }), - resolveEnsProfileQueryFunction, - { - ...config, - staleTime: 10 * 60 * 1_000, // 10 min - }, - ); + return useQuery({ + queryKey: EnsProfileQueryKey({ addressOrName }), + queryFn: resolveEnsProfileQueryFunction, + ...config, + staleTime: 10 * 60 * 1_000, // 10 min + }); } diff --git a/src/core/resources/nfts/nfts.ts b/src/core/resources/nfts/nfts.ts index ba49a0e7c3..85f0af7088 100644 --- a/src/core/resources/nfts/nfts.ts +++ b/src/core/resources/nfts/nfts.ts @@ -1,6 +1,5 @@ import { useInfiniteQuery } from '@tanstack/react-query'; -import { Chain } from 'viem'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { fetchNftCollections, @@ -14,7 +13,7 @@ import { createQueryKey, queryClient, } from '~/core/react-query'; -import { ChainName, chainNameToIdMapping } from '~/core/types/chains'; +import { ChainId, ChainName, chainNameToIdMapping } from '~/core/types/chains'; import { PolygonAllowListDictionary, SimpleHashCollectionDetails, @@ -30,6 +29,7 @@ import { } from '~/core/utils/nfts'; import { isLowerCaseMatch } from '~/core/utils/strings'; import { NFTS_TEST_DATA } from '~/test/utils'; + const EMPTY_WALLET_ADDRESS = '0x3637f053D542E6D00Eee42D656dD7C59Fa33a62F'; const POLYGON_ALLOWLIST_STALE_TIME = 600000; // 10 minutes @@ -40,53 +40,58 @@ const POLYGON_ALLOWLIST_STALE_TIME = 600000; // 10 minutes export type NftsArgs = { address: Address; testnetMode: boolean; - userChains: Chain[]; + userChainIds: ChainId[]; }; // /////////////////////////////////////////////// // Query Key -const nftsQueryKey = ({ address, testnetMode, userChains }: NftsArgs) => +const nftsQueryKey = ({ address, testnetMode, userChainIds }: NftsArgs) => createQueryKey( 'nfts', - { address, testnetMode, userChains }, - { persisterVersion: 3 }, + { address, testnetMode, userChainIds }, + { persisterVersion: 4 }, ); // /////////////////////////////////////////////// // Query Function +type _QueryResult = { + cutoff?: number; + nextPage?: string; + pages?: { + nfts: UniqueAsset[]; + nextPage?: string; + }[]; + nfts: UniqueAsset[]; +}; + async function nftsQueryFunction({ - queryKey: [{ address, testnetMode, userChains }], + queryKey: [{ address, testnetMode, userChainIds }], pageParam, -}: QueryFunctionArgs) { +}: QueryFunctionArgs): Promise<_QueryResult> { if ( process.env.IS_TESTING === 'true' && isLowerCaseMatch(address, EMPTY_WALLET_ADDRESS) ) { - return NFTS_TEST_DATA; + return NFTS_TEST_DATA as unknown as _QueryResult; } - const activeChainIds = userChains - .filter((chain) => { - return !testnetMode ? !chain.testnet : chain.testnet; - }) - .map((chain) => chain.id); const simplehashChainNames = !testnetMode ? getSimpleHashSupportedChainNames() : getSimpleHashSupportedTestnetChainNames(); const chains = simplehashChainNames.filter((simplehashChainName) => { const id = chainNameToIdMapping[simplehashChainName]; - return activeChainIds.includes(id) || simplehashChainName === 'gnosis'; + return userChainIds.includes(id) || simplehashChainName === 'gnosis'; }) as ChainName[]; const polygonAllowList = await polygonAllowListFetcher(); const acquisitionMap: Record = {}; const collectionsResponse = await fetchNftCollections({ address, chains, - cursor: pageParam, + cursor: pageParam as string | undefined, }); const collections = collectionsResponse.collections; - const nextPage = collectionsResponse.nextPage; + const nextPage = collectionsResponse.nextPage || undefined; const filteredCollections = collections?.filter( (collection: SimpleHashCollectionDetails) => { const polygonContractAddressString = @@ -156,41 +161,33 @@ async function nftsQueryFunction({ }; } -type NftsResult = QueryFunctionResult; +export type NftsResult = QueryFunctionResult; // /////////////////////////////////////////////// // Query Hook export function useNfts( - { address, testnetMode, userChains }: NftsArgs, + { address, testnetMode, userChainIds }: NftsArgs, config: InfiniteQueryConfig = {}, ) { - return useInfiniteQuery( - nftsQueryKey({ address, testnetMode, userChains }), - nftsQueryFunction, - { - ...config, - getNextPageParam: (lastPage) => lastPage?.nextPage, - refetchInterval: 600000, - retry: 3, - }, - ); + return useInfiniteQuery({ + queryKey: nftsQueryKey({ address, testnetMode, userChainIds }), + queryFn: nftsQueryFunction, + getNextPageParam: (lastPage) => lastPage?.nextPage || null, + initialPageParam: null, + placeholderData: (previousData) => previousData, + ...config, + refetchInterval: 600000, + retry: 3, + }); } // /////////////////////////////////////////////// // Query Utils -export function getNftCount({ address, testnetMode, userChains }: NftsArgs) { - const nftData: - | { - pages: { - nfts: UniqueAsset[]; - nextPage?: string; - }[]; - pageParams: (string | null)[]; - } - | undefined = queryClient.getQueryData( - nftsQueryKey({ address, testnetMode, userChains }), +export function getNftCount({ address, testnetMode, userChainIds }: NftsArgs) { + const nftData: _QueryResult | undefined = queryClient.getQueryData( + nftsQueryKey({ address, testnetMode, userChainIds }), ); if (nftData?.pages) { const nfts = nftData?.pages @@ -206,9 +203,9 @@ export function getNftCount({ address, testnetMode, userChains }: NftsArgs) { // Polygon Allow List Fetcher function polygonAllowListFetcher() { - return queryClient.fetchQuery( - ['137-allowlist'], - async () => await fetchPolygonAllowList(), - { staleTime: POLYGON_ALLOWLIST_STALE_TIME }, - ); + return queryClient.fetchQuery({ + queryKey: ['137-allowlist'], + queryFn: async () => await fetchPolygonAllowList(), + staleTime: POLYGON_ALLOWLIST_STALE_TIME, + }); } diff --git a/src/core/resources/positions/index.ts b/src/core/resources/positions/index.ts index 8befe3ec21..089b8603af 100644 --- a/src/core/resources/positions/index.ts +++ b/src/core/resources/positions/index.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -154,8 +154,9 @@ async function positionsQueryFunctionRetryByChain({ try { const cache = queryClient.getQueryCache(); const cachedPositions = - (cache.find(positionsQueryKey({ address, currency, testnetMode }))?.state - ?.data as ParsedPositionsByChain) || {}; + (cache.find({ + queryKey: positionsQueryKey({ address, currency, testnetMode }), + })?.state?.data as ParsedPositionsByChain) || {}; const retries = []; for (const chainIdWithError of chainIds) { retries.push( @@ -237,11 +238,11 @@ export async function fetchPositions( PositionsQueryKey > = {}, ) { - return await queryClient.fetchQuery( - positionsQueryKey({ address, currency, testnetMode }), - positionsQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: positionsQueryKey({ address, currency, testnetMode }), + queryFn: positionsQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -256,11 +257,11 @@ export function usePositions( PositionsQueryKey > = {}, ) { - return useQuery( - positionsQueryKey({ address, currency, testnetMode }), - positionsQueryFunction, - config, - ); + return useQuery({ + queryKey: positionsQueryKey({ address, currency, testnetMode }), + queryFn: positionsQueryFunction, + ...config, + }); } function parsePositions( diff --git a/src/core/resources/search/swappableAddresses.ts b/src/core/resources/search/swappableAddresses.ts index 9d9e7d686c..7ddb07f71d 100644 --- a/src/core/resources/search/swappableAddresses.ts +++ b/src/core/resources/search/swappableAddresses.ts @@ -66,15 +66,15 @@ export async function fetchSwappableAddresses( SwappableAddressesQueryKey > = {}, ) { - return await queryClient.fetchQuery( - swappableAddressesQueryKey({ + return await queryClient.fetchQuery({ + queryKey: swappableAddressesQueryKey({ addresses, fromChainId, toChainId, }), - swappableAddressesQueryFunction, - config, - ); + queryFn: swappableAddressesQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -89,13 +89,13 @@ export function useSwappableAddresses( SwappableAddressesQueryKey > = {}, ) { - return useQuery( - swappableAddressesQueryKey({ + return useQuery({ + queryKey: swappableAddressesQueryKey({ addresses, fromChainId, toChainId, }), - swappableAddressesQueryFunction, - config, - ); + queryFn: swappableAddressesQueryFunction, + ...config, + }); } diff --git a/src/core/resources/search/tokenSearch.ts b/src/core/resources/search/tokenSearch.ts index 9ec7513eec..0dbe042faf 100644 --- a/src/core/resources/search/tokenSearch.ts +++ b/src/core/resources/search/tokenSearch.ts @@ -1,7 +1,7 @@ import { isAddress } from '@ethersproject/address'; import { useQuery } from '@tanstack/react-query'; import qs from 'qs'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { tokenSearchHttp } from '~/core/network/tokenSearch'; import { @@ -130,11 +130,18 @@ export async function fetchTokenSearch( TokenSearchQueryKey > = {}, ) { - return await queryClient.fetchQuery( - tokenSearchQueryKey({ chainId, fromChainId, keys, list, threshold, query }), - tokenSearchQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: tokenSearchQueryKey({ + chainId, + fromChainId, + keys, + list, + threshold, + query, + }), + queryFn: tokenSearchQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -149,9 +156,16 @@ export function useTokenSearch( TokenSearchQueryKey > = {}, ) { - return useQuery( - tokenSearchQueryKey({ chainId, fromChainId, keys, list, threshold, query }), - tokenSearchQueryFunction, - config, - ); + return useQuery({ + queryKey: tokenSearchQueryKey({ + chainId, + fromChainId, + keys, + list, + threshold, + query, + }), + queryFn: tokenSearchQueryFunction, + ...config, + }); } diff --git a/src/core/resources/transactions/consolidatedTransactions.ts b/src/core/resources/transactions/consolidatedTransactions.ts index 203489f289..c8081f892d 100644 --- a/src/core/resources/transactions/consolidatedTransactions.ts +++ b/src/core/resources/transactions/consolidatedTransactions.ts @@ -1,5 +1,5 @@ import { useInfiniteQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addysHttp } from '~/core/network/addys'; import { @@ -62,15 +62,15 @@ export async function fetchConsolidatedTransactions< ConsolidatedTransactionsQueryKey >, ) { - return await queryClient.fetchQuery( - consolidatedTransactionsQueryKey({ + return await queryClient.fetchQuery({ + queryKey: consolidatedTransactionsQueryKey({ address, currency, userChainIds, }), - consolidatedTransactionsQueryFunction, - config, - ); + queryFn: consolidatedTransactionsQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -79,6 +79,7 @@ export async function fetchConsolidatedTransactions< type _QueryResult = { cutoff?: number; nextPage?: string; + pages?: { cutoff: number; transactions: RainbowTransaction[] }[]; transactions: RainbowTransaction[]; }; @@ -95,7 +96,7 @@ export async function consolidatedTransactionsQueryFunction({ params: { currency: currency.toLowerCase(), // passing empty value to pageParam breaks request - ...(pageParam ? { pageCursor: pageParam } : {}), + ...(pageParam ? { pageCursor: pageParam as string } : {}), }, timeout: CONSOLIDATED_TRANSACTIONS_TIMEOUT, }, @@ -152,18 +153,17 @@ export function useConsolidatedTransactions< TSelectData > = {}, ) { - return useInfiniteQuery( - consolidatedTransactionsQueryKey({ + return useInfiniteQuery({ + queryKey: consolidatedTransactionsQueryKey({ address, currency, userChainIds, }), - consolidatedTransactionsQueryFunction, - { - ...config, - getNextPageParam: (lastPage) => lastPage?.nextPage, - refetchInterval: CONSOLIDATED_TRANSACTIONS_INTERVAL, - retry: 3, - }, - ); + queryFn: consolidatedTransactionsQueryFunction, + ...config, + getNextPageParam: (lastPage) => lastPage?.nextPage, + initialPageParam: null, + refetchInterval: CONSOLIDATED_TRANSACTIONS_INTERVAL, + retry: 3, + }); } diff --git a/src/core/resources/transactions/firstTransactionTimestampQuery.ts b/src/core/resources/transactions/firstTransactionTimestampQuery.ts index 5e10636631..e11e896667 100644 --- a/src/core/resources/transactions/firstTransactionTimestampQuery.ts +++ b/src/core/resources/transactions/firstTransactionTimestampQuery.ts @@ -69,11 +69,11 @@ export async function fetchFirstTransactionTimestamp( FirstTransactionTimestampQueryKey > = {}, ) { - return await queryClient.fetchQuery( - firstTransactionTimestampQueryKey({ address }), - firstTransactionTimestampQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: firstTransactionTimestampQueryKey({ address }), + queryFn: firstTransactionTimestampQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -88,9 +88,9 @@ export function useFirstTransactionTimestamp( FirstTransactionTimestampQueryKey > = {}, ) { - return useQuery( - firstTransactionTimestampQueryKey({ address }), - firstTransactionTimestampQueryFunction, - config, - ); + return useQuery({ + queryKey: firstTransactionTimestampQueryKey({ address }), + queryFn: firstTransactionTimestampQueryFunction, + ...config, + }); } diff --git a/src/core/resources/transactions/registryLookup.ts b/src/core/resources/transactions/registryLookup.ts index ab3617051c..3a64e3d46a 100644 --- a/src/core/resources/transactions/registryLookup.ts +++ b/src/core/resources/transactions/registryLookup.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address, getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { @@ -11,6 +11,7 @@ import { } from '~/core/react-query'; import { ChainId } from '~/core/types/chains'; import { methodRegistryLookupAndParse } from '~/core/utils/methodRegistry'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RainbowError, logger } from '~/logger'; // /////////////////////////////////////////////// @@ -90,11 +91,11 @@ export async function fetchRegistryLookup( RegistryLookupQueryKey > = {}, ) { - return await queryClient.fetchQuery( - registryLookupQueryKey({ data, to, chainId, hash }), - registryLookupQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: registryLookupQueryKey({ data, to, chainId, hash }), + queryFn: registryLookupQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -109,9 +110,9 @@ export function useRegistryLookup( RegistryLookupQueryKey > = {}, ) { - return useQuery( - registryLookupQueryKey({ data, to, chainId, hash }), - registryLookupQueryFunction, - config, - ); + return useQuery({ + queryKey: registryLookupQueryKey({ data, to, chainId, hash }), + queryFn: registryLookupQueryFunction, + ...config, + }); } diff --git a/src/core/resources/transactions/transaction.ts b/src/core/resources/transactions/transaction.ts index af5254e5e9..03c2bf38a3 100644 --- a/src/core/resources/transactions/transaction.ts +++ b/src/core/resources/transactions/transaction.ts @@ -1,8 +1,7 @@ import { Provider, TransactionResponse } from '@ethersproject/providers'; import { formatUnits } from '@ethersproject/units'; import { QueryClient, useQuery, useQueryClient } from '@tanstack/react-query'; -import { Hash, getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address, Hash } from 'viem'; import { i18n } from '~/core/languages'; import { addysHttp } from '~/core/network/addys'; @@ -25,6 +24,7 @@ import { TxHash, } from '~/core/types/transactions'; import { parseTransaction } from '~/core/utils/transactions'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { useUserChains } from '~/entries/popup/hooks/useUserChains'; import { RainbowError, logger } from '~/logger'; diff --git a/src/core/resources/transactions/transactions.ts b/src/core/resources/transactions/transactions.ts index 512a6f999b..b5709d993e 100644 --- a/src/core/resources/transactions/transactions.ts +++ b/src/core/resources/transactions/transactions.ts @@ -57,11 +57,16 @@ export async function fetchTransactions( TransactionsQueryKey >, ) { - return await queryClient.fetchQuery( - transactionsQueryKey({ address, chainId, currency, transactionsLimit }), - transactionsQueryFunction, - config, - ); + return await queryClient.fetchQuery({ + queryKey: transactionsQueryKey({ + address, + chainId, + currency, + transactionsLimit, + }), + queryFn: transactionsQueryFunction, + ...config, + }); } // /////////////////////////////////////////////// @@ -86,9 +91,14 @@ async function transactionsQueryFunction({ return parseTransactions(response?.data, currency); } catch (e) { const cache = queryClient.getQueryCache(); - const cachedTransactions = cache.find( - transactionsQueryKey({ address, chainId, currency, transactionsLimit }), - )?.state?.data as RainbowTransaction[]; + const cachedTransactions = cache.find({ + queryKey: transactionsQueryKey({ + address, + chainId, + currency, + transactionsLimit, + }), + })?.state?.data as RainbowTransaction[]; logger.error(new RainbowError('transactionsQueryFunction: '), { message: (e as Error)?.message, }); @@ -128,12 +138,15 @@ export function useTransactions( TransactionsQueryKey > = {}, ) { - return useQuery( - transactionsQueryKey({ address, currency, chainId, transactionsLimit }), - transactionsQueryFunction, - { - ...config, - refetchInterval: TRANSACTIONS_REFETCH_INTERVAL, - }, - ); + return useQuery({ + queryKey: transactionsQueryKey({ + address, + currency, + chainId, + transactionsLimit, + }), + queryFn: transactionsQueryFunction, + ...config, + refetchInterval: TRANSACTIONS_REFETCH_INTERVAL, + }); } diff --git a/src/core/state/appConnectionWalletSwitcher/appConnectionSwitcher.ts b/src/core/state/appConnectionWalletSwitcher/appConnectionSwitcher.ts index 643db7d92b..67426d50a6 100644 --- a/src/core/state/appConnectionWalletSwitcher/appConnectionSwitcher.ts +++ b/src/core/state/appConnectionWalletSwitcher/appConnectionSwitcher.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/appSessions/index.ts b/src/core/state/appSessions/index.ts index 4abf68260a..abf92d3305 100644 --- a/src/core/state/appSessions/index.ts +++ b/src/core/state/appSessions/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { ChainId } from '~/core/types/chains'; diff --git a/src/core/state/contacts/index.ts b/src/core/state/contacts/index.ts index c387b1c97c..faeb18bc68 100644 --- a/src/core/state/contacts/index.ts +++ b/src/core/state/contacts/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/currentSettings/currentAddress.ts b/src/core/state/currentSettings/currentAddress.ts index 04a1490490..549a8a1cb0 100644 --- a/src/core/state/currentSettings/currentAddress.ts +++ b/src/core/state/currentSettings/currentAddress.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '~/core/state/internal/createStore'; diff --git a/src/core/state/hiddenAssets/hiddenAssets.ts b/src/core/state/hiddenAssets/hiddenAssets.ts index cf6601b604..5927caeb0b 100644 --- a/src/core/state/hiddenAssets/hiddenAssets.ts +++ b/src/core/state/hiddenAssets/hiddenAssets.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { ParsedUserAsset } from '~/core/types/assets'; diff --git a/src/core/state/hiddenWallets/index.ts b/src/core/state/hiddenWallets/index.ts index 8f4a40990a..ec98fd1c94 100644 --- a/src/core/state/hiddenWallets/index.ts +++ b/src/core/state/hiddenWallets/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/nfts/index.ts b/src/core/state/nfts/index.ts index 0060902504..2650edef9b 100644 --- a/src/core/state/nfts/index.ts +++ b/src/core/state/nfts/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/nonce/index.ts b/src/core/state/nonce/index.ts index ca2348e6ee..9842323045 100644 --- a/src/core/state/nonce/index.ts +++ b/src/core/state/nonce/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { ChainId } from '~/core/types/chains'; diff --git a/src/core/state/pinnedAssets/index.ts b/src/core/state/pinnedAssets/index.ts index 31cf6525fa..e0cd887f55 100644 --- a/src/core/state/pinnedAssets/index.ts +++ b/src/core/state/pinnedAssets/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/popupInstances/index.ts b/src/core/state/popupInstances/index.ts index 3eae417687..c8368074e9 100644 --- a/src/core/state/popupInstances/index.ts +++ b/src/core/state/popupInstances/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { ParsedSearchAsset } from '~/core/types/assets'; diff --git a/src/core/state/rainbowChainAssets/index.ts b/src/core/state/rainbowChainAssets/index.ts index 5ee81e6485..21423c1ee4 100644 --- a/src/core/state/rainbowChainAssets/index.ts +++ b/src/core/state/rainbowChainAssets/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { ChainId } from '~/core/types/chains'; diff --git a/src/core/state/rainbowChains/index.test.ts b/src/core/state/rainbowChains/index.test.ts index b3ac1787a9..35a500feff 100644 --- a/src/core/state/rainbowChains/index.test.ts +++ b/src/core/state/rainbowChains/index.test.ts @@ -1,6 +1,6 @@ +import { Chain } from 'viem'; import { celo, fantom } from 'viem/chains'; import { expect, test } from 'vitest'; -import { Chain } from 'wagmi'; import { rainbowChainsStore } from '.'; @@ -12,7 +12,6 @@ const TEST_RPC_1: Chain = { }, id: fantom.id, name: 'Test RPC 1', - network: 'rpc-1', nativeCurrency: { name: 'TR1', symbol: 'TR1', @@ -30,7 +29,6 @@ const TEST_RPC_2: Chain = { }, id: fantom.id, name: 'Test RPC 2', - network: 'rpc-2', nativeCurrency: { name: 'TR2', symbol: 'TR2', @@ -48,7 +46,6 @@ const TEST_RPC_3: Chain = { }, id: celo.id, name: 'Test RPC 3', - network: 'rpc-3', nativeCurrency: { name: 'TR3', symbol: 'TR3', diff --git a/src/core/state/savedEnsNames/index.ts b/src/core/state/savedEnsNames/index.ts index 851c2ad878..20c344b197 100644 --- a/src/core/state/savedEnsNames/index.ts +++ b/src/core/state/savedEnsNames/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/transactions/customNetworkTransactions/index.ts b/src/core/state/transactions/customNetworkTransactions/index.ts index 16dc8e008e..a61da72c97 100644 --- a/src/core/state/transactions/customNetworkTransactions/index.ts +++ b/src/core/state/transactions/customNetworkTransactions/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { RainbowTransaction } from '~/core/types/transactions'; diff --git a/src/core/state/transactions/pendingTransactions/index.ts b/src/core/state/transactions/pendingTransactions/index.ts index 837022db21..b29e2d181b 100644 --- a/src/core/state/transactions/pendingTransactions/index.ts +++ b/src/core/state/transactions/pendingTransactions/index.ts @@ -1,5 +1,5 @@ import { isAddress } from '@ethersproject/address'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { RainbowTransaction } from '~/core/types/transactions'; @@ -97,7 +97,7 @@ export const pendingTransactionsStore = createStore( const state = persistedState as PendingTransactionsState; if (version === 0) { const oldState = persistedState as PendingTransactionsStateV1; - const addresses = Object.keys(oldState); + const addresses = Object.keys(oldState) as Address[]; const pendingTransactions: { [key: string]: RainbowTransaction[] } = addresses.reduce( (accumulator, currentKey) => { @@ -121,7 +121,7 @@ export const pendingTransactionsStore = createStore( } if (version === 1) { const oldState = persistedState as PendingTransactionsStateV1; - const addresses = Object.keys(oldState); + const addresses = Object.keys(oldState) as Address[]; const pendingTransactions: { [key: string]: RainbowTransaction[] } = addresses.reduce( (accumulator, currentKey) => { diff --git a/src/core/state/walletBackups/index.ts b/src/core/state/walletBackups/index.ts index 97b414a96e..87f90101d6 100644 --- a/src/core/state/walletBackups/index.ts +++ b/src/core/state/walletBackups/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { KeychainType, KeychainWallet } from '~/core/types/keychainTypes'; diff --git a/src/core/state/walletNames/index.ts b/src/core/state/walletNames/index.ts index 7e7cfdcf78..c0ea102dbf 100644 --- a/src/core/state/walletNames/index.ts +++ b/src/core/state/walletNames/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/state/walletOrder/index.ts b/src/core/state/walletOrder/index.ts index 6f99b4bd00..96b761e61a 100644 --- a/src/core/state/walletOrder/index.ts +++ b/src/core/state/walletOrder/index.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import create from 'zustand'; import { createStore } from '../internal/createStore'; diff --git a/src/core/types/assets.ts b/src/core/types/assets.ts index 277b51485d..f52ec5e786 100644 --- a/src/core/types/assets.ts +++ b/src/core/types/assets.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { ChainId, ChainName } from '~/core/types/chains'; diff --git a/src/core/types/chains.ts b/src/core/types/chains.ts index ae1725b083..fdb6d4b0e4 100644 --- a/src/core/types/chains.ts +++ b/src/core/types/chains.ts @@ -1,5 +1,16 @@ -import * as chain from 'viem/chains'; -import type { Chain } from 'wagmi'; +import { + Chain, + arbitrumNova, + arbitrumSepolia, + baseSepolia, + celo, + holesky, + optimismSepolia, + polygonZkEvm, + scroll, + sepolia, +} from 'viem/chains'; +import * as chains from 'viem/chains'; const HARDHAT_CHAIN_ID = 1337; const BLAST_CHAIN_ID = 81457; @@ -11,7 +22,6 @@ const HARDHAT_OP_CHAIN_ID = 1338; export const chainHardhat: Chain = { id: HARDHAT_CHAIN_ID, name: 'Hardhat', - network: 'hardhat', nativeCurrency: { decimals: 18, name: 'Hardhat', @@ -27,7 +37,6 @@ export const chainHardhat: Chain = { export const chainHardhatOptimism: Chain = { id: HARDHAT_OP_CHAIN_ID, name: 'Hardhat OP', - network: 'hardhat-optimism', nativeCurrency: { decimals: 18, name: 'Hardhat OP', @@ -43,7 +52,6 @@ export const chainHardhatOptimism: Chain = { export const chainBlast: Chain = { id: BLAST_CHAIN_ID, name: 'Blast', - network: 'blast', rpcUrls: { public: { http: [process.env.BLAST_MAINNET_RPC as string] }, default: { @@ -63,7 +71,6 @@ export const chainBlast: Chain = { export const chainBlastSepolia: Chain = { id: BLAST_SEPOLIA_CHAIN_ID, name: 'Blast Sepolia', - network: 'blast-sepolia', nativeCurrency: { decimals: 18, name: 'Ether', @@ -79,7 +86,6 @@ export const chainBlastSepolia: Chain = { export const chainPolygonAmoy: Chain = { id: POLYGON_AMOY_CHAIN_ID, name: 'Polygon Amoy', - network: 'polygon-amoy', nativeCurrency: { decimals: 18, name: 'MATIC', @@ -95,7 +101,6 @@ export const chainPolygonAmoy: Chain = { export const chainDegen: Chain = { id: 666666666, name: 'Degen Chain', - network: 'degen', nativeCurrency: { decimals: 18, name: 'Degen', @@ -145,36 +150,36 @@ export enum ChainName { } export enum ChainId { - arbitrum = chain.arbitrum.id, - arbitrumNova = chain.arbitrumNova.id, - avalanche = chain.avalanche.id, - avalancheFuji = chain.avalancheFuji.id, - base = chain.base.id, - blast = BLAST_CHAIN_ID, - blastSepolia = BLAST_SEPOLIA_CHAIN_ID, - bsc = chain.bsc.id, - celo = chain.celo.id, - gnosis = chain.gnosis.id, - linea = chain.linea.id, - manta = chain.manta.id, - optimism = chain.optimism.id, - mainnet = chain.mainnet.id, - polygon = chain.polygon.id, - polygonZkEvm = chain.polygonZkEvm.id, + arbitrum = chains.arbitrum.id, + arbitrumNova = chains.arbitrumNova.id, + avalanche = chains.avalanche.id, + avalancheFuji = chains.avalancheFuji.id, + base = chains.base.id, + blast = chains.blast.id, + blastSepolia = chains.blastSepolia.id, + bsc = chains.bsc.id, + celo = chains.celo.id, + gnosis = chains.gnosis.id, + linea = chains.linea.id, + manta = chains.manta.id, + optimism = chains.optimism.id, + mainnet = chains.mainnet.id, + polygon = chains.polygon.id, + polygonZkEvm = chains.polygonZkEvm.id, rari = 1380012617, - zora = chain.zora.id, - hardhat = HARDHAT_CHAIN_ID, + zora = chains.zora.id, + hardhat = chainHardhat.id, hardhatOptimism = chainHardhatOptimism.id, - sepolia = chain.sepolia.id, - scroll = chain.scroll.id, - holesky = chain.holesky.id, - optimismSepolia = chain.optimismSepolia.id, - bscTestnet = chain.bscTestnet.id, - arbitrumSepolia = chain.arbitrumSepolia.id, - baseSepolia = chain.baseSepolia.id, - zoraSepolia = chain.zoraSepolia.id, - polygonAmoy = chainPolygonAmoy.id, - degen = chainDegen.id, + sepolia = chains.sepolia.id, + scroll = chains.scroll.id, + holesky = chains.holesky.id, + optimismSepolia = chains.optimismSepolia.id, + bscTestnet = chains.bscTestnet.id, + arbitrumSepolia = chains.arbitrumSepolia.id, + baseSepolia = chains.baseSepolia.id, + zoraSepolia = chains.zoraSepolia.id, + polygonAmoy = chains.polygonAmoy.id, + degen = chains.degen.id, } export const chainNameToIdMapping: { @@ -251,31 +256,31 @@ export const chainIdToNameMapping: { export const ChainNameDisplay = { [ChainId.arbitrum]: 'Arbitrum', - [ChainId.arbitrumNova]: chain.arbitrumNova.name, + [ChainId.arbitrumNova]: arbitrumNova.name, [ChainId.avalanche]: 'Avalanche', [ChainId.avalancheFuji]: 'Avalanche Fuji', [ChainId.base]: 'Base', [ChainId.blast]: 'Blast', [ChainId.blastSepolia]: 'Blast Sepolia', [ChainId.bsc]: 'BSC', - [ChainId.celo]: chain.celo.name, + [ChainId.celo]: celo.name, [ChainId.linea]: 'Linea', [ChainId.manta]: 'Manta', [ChainId.optimism]: 'Optimism', [ChainId.polygon]: 'Polygon', - [ChainId.polygonZkEvm]: chain.polygonZkEvm.name, + [ChainId.polygonZkEvm]: polygonZkEvm.name, [ChainId.rari]: 'RARI Chain', - [ChainId.scroll]: chain.scroll.name, + [ChainId.scroll]: scroll.name, [ChainId.zora]: 'Zora', [ChainId.mainnet]: 'Ethereum', [ChainId.hardhat]: 'Hardhat', [ChainId.hardhatOptimism]: chainHardhatOptimism.name, - [ChainId.sepolia]: chain.sepolia.name, - [ChainId.holesky]: chain.holesky.name, - [ChainId.optimismSepolia]: chain.optimismSepolia.name, + [ChainId.sepolia]: sepolia.name, + [ChainId.holesky]: holesky.name, + [ChainId.optimismSepolia]: optimismSepolia.name, [ChainId.bscTestnet]: 'BSC Testnet', - [ChainId.arbitrumSepolia]: chain.arbitrumSepolia.name, - [ChainId.baseSepolia]: chain.baseSepolia.name, + [ChainId.arbitrumSepolia]: arbitrumSepolia.name, + [ChainId.baseSepolia]: baseSepolia.name, [ChainId.zoraSepolia]: 'Zora Sepolia', [ChainId.polygonAmoy]: 'Polygon Amoy', [ChainId.degen]: 'Degen', diff --git a/src/core/types/search.ts b/src/core/types/search.ts index 7d7734f527..9795a65409 100644 --- a/src/core/types/search.ts +++ b/src/core/types/search.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AddressOrEth, ParsedAsset, UniqueId } from './assets'; import { ChainId } from './chains'; diff --git a/src/core/types/transactions.ts b/src/core/types/transactions.ts index 89ae39f5af..952554ceef 100644 --- a/src/core/types/transactions.ts +++ b/src/core/types/transactions.ts @@ -1,5 +1,5 @@ import { TransactionResponse } from '@ethersproject/providers'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AssetApiResponse, diff --git a/src/core/utils/address.ts b/src/core/utils/address.ts index 6abb7dfd5d..db36ec100f 100644 --- a/src/core/utils/address.ts +++ b/src/core/utils/address.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AddressOrEth, UniqueId } from '../types/assets'; import { ChainId } from '../types/chains'; diff --git a/src/core/utils/assets.ts b/src/core/utils/assets.ts index b7aa2a882b..f571243b0f 100644 --- a/src/core/utils/assets.ts +++ b/src/core/utils/assets.ts @@ -1,7 +1,8 @@ import { AddressZero } from '@ethersproject/constants'; +import { Contract } from '@ethersproject/contracts'; import { Provider } from '@ethersproject/providers'; -import { Address, erc20ABI } from 'wagmi'; -import { getContract } from 'wagmi/actions'; +import { getClient } from '@wagmi/core'; +import { Address, Client, erc20Abi, getContract } from 'viem'; import { ETH_ADDRESS, SupportedCurrencyKey } from '~/core/references'; import { @@ -20,6 +21,8 @@ import { requestMetadata } from '../graphql'; import { i18n } from '../languages'; import { AddysPositionAsset } from '../resources/positions'; import { SearchAsset } from '../types/search'; +import { wagmiConfig } from '../wagmi'; +import { getProvider } from '../wagmi/clientToProvider'; import { chainNameFromChainId, @@ -306,11 +309,9 @@ export const fetchAssetBalanceViaProvider = async ({ }) => { const balance = parsedAsset.isNativeAsset ? await provider.getBalance(currentAddress) - : await getContract({ - address: parsedAsset.address, - abi: erc20ABI, - signerOrProvider: provider, - }).balanceOf(currentAddress); + : await new Contract(parsedAsset.address, erc20Abi, provider).balanceOf( + currentAddress, + ); const updatedAsset = parseUserAssetBalances({ asset: parsedAsset, @@ -368,22 +369,18 @@ export const createAssetQuery = ( export const getAssetMetadata = async ({ address, - provider, + chainId, }: { address: Address; - provider: Provider; + chainId: ChainId; }) => { - const contract = await getContract({ - address, - abi: erc20ABI, - signerOrProvider: provider, - }); + const provider = getProvider({ chainId }); + const contract = new Contract(address, erc20Abi, provider); const [decimals, symbol, name] = await Promise.allSettled([ contract.decimals(), contract.symbol(), contract.name(), ]); - return { decimals: extractFulfilledValue(decimals), symbol: extractFulfilledValue(symbol), @@ -394,17 +391,18 @@ export const getAssetMetadata = async ({ export const getAssetBalance = async ({ assetAddress, currentAddress, - provider, + chainId, }: { assetAddress: Address; currentAddress: Address; - provider: Provider; + chainId: ChainId; }) => { + const client = getClient(wagmiConfig, { chainId }) as Client; const balance = await getContract({ address: assetAddress, - abi: erc20ABI, - signerOrProvider: provider, - }).balanceOf(currentAddress); + abi: erc20Abi, + client, + }).read.balanceOf([currentAddress]); return balance.toString(); }; diff --git a/src/core/utils/chains.ts b/src/core/utils/chains.ts index 37c0a80448..b61887a599 100644 --- a/src/core/utils/chains.ts +++ b/src/core/utils/chains.ts @@ -1,6 +1,5 @@ import { AddressZero } from '@ethersproject/constants'; import { JsonRpcProvider } from '@ethersproject/providers'; -import { getNetwork } from '@wagmi/core'; import { Chain, celo, @@ -9,7 +8,7 @@ import { mainnet, moonbeam, } from 'viem/chains'; -import { useNetwork } from 'wagmi'; +import { useConfig } from 'wagmi'; import { NATIVE_ASSETS_PER_CHAIN, @@ -26,17 +25,14 @@ import { } from '~/core/types/chains'; import { proxyRpcEndpoint } from '../providers'; -import { - RAINBOW_CHAINS_SUPPORTED, - rainbowChainsStore, -} from '../state/rainbowChains'; +import { RAINBOW_CHAINS_SUPPORTED } from '../state/rainbowChains'; import { AddressOrEth } from '../types/assets'; +import { wagmiConfig } from '../wagmi'; import { getDappHost, isValidUrl } from './connectedApps'; +import { findRainbowChainForChainId } from './rainbowChains'; import { isLowerCaseMatch } from './strings'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore export const customChainIdsToAssetNames: Record = { 42170: 'arbitrumnova', 1313161554: 'aurora', @@ -81,7 +77,7 @@ export const customChainIdsToAssetNames: Record = { }; export const getSupportedChainsWithHardhat = () => { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; return chains.filter( (chain) => !chain.testnet || @@ -94,12 +90,12 @@ export const isDefaultSupportedChain = ({ chainId }: { chainId: ChainId }) => SUPPORTED_CHAIN_IDS.map((id) => id).includes(chainId); export const getSupportedChains = () => { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; return chains.filter((chain) => !chain.testnet); }; export const useMainChains = () => { - const { chains } = useNetwork(); + const { chains } = useConfig(); // All the mainnets we support const mainSupportedChains = SUPPORTED_MAINNET_CHAINS.filter( (chain) => !chain.testnet, @@ -129,7 +125,7 @@ export const useMainChains = () => { }; export const getMainChains = () => { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; // All the mainnets we support const mainSupportedChains = SUPPORTED_MAINNET_CHAINS.filter( (chain) => !chain.testnet, @@ -162,7 +158,7 @@ export const getSupportedChainIds = () => getSupportedChains().map((chain) => chain.id); export const getSupportedTestnetChains = () => { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; return chains.filter((chain) => !!chain.testnet); }; @@ -205,7 +201,7 @@ export const useBackendSupportedChains = ({ }: { testnetMode?: boolean; }) => { - const { chains } = useNetwork(); + const { chains } = useConfig(); return chains.filter((chain) => testnetMode ? !!chain.testnet : !chain.testnet, ); @@ -216,30 +212,12 @@ export const getBackendSupportedChains = ({ }: { testnetMode?: boolean; }) => { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; return chains.filter((chain) => testnetMode ? !!chain.testnet : !chain.testnet, ); }; -export const getRainbowChains = () => { - const { rainbowChains } = rainbowChainsStore.getState(); - return { - rainbowChains: Object.values(rainbowChains) - .map((rainbowChain) => - rainbowChain.chains.find( - (rpc) => rpc.rpcUrls.default.http[0] === rainbowChain.activeRpcUrl, - ), - ) - .filter(Boolean), - }; -}; - -export const findRainbowChainForChainId = (chainId: number) => { - const { rainbowChains } = getRainbowChains(); - return rainbowChains.find((chain) => chain.id === chainId); -}; - export const getChainName = ({ chainId }: { chainId: number }) => { const chain = getChain({ chainId }); return ChainNameDisplay[chainId] || chain.name; @@ -299,7 +277,7 @@ export function getBlockExplorerHostForChain(chainId: ChainId) { } export function getChain({ chainId }: { chainId?: ChainId }) { - const { chains } = getNetwork(); + const { chains } = wagmiConfig; const chain = chains.find((chain) => chain.id === chainId); return chain || { ...mainnet, testnet: false }; } diff --git a/src/core/utils/defaults.ts b/src/core/utils/defaults.ts index 18c1a38d3a..e1da246541 100644 --- a/src/core/utils/defaults.ts +++ b/src/core/utils/defaults.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; export const DEFAULT_ACCOUNT = '0x70c16D2dB6B00683b29602CBAB72CE0Dcbc243C4' as Address; diff --git a/src/core/utils/ethereum.ts b/src/core/utils/ethereum.ts index debfce74b1..ee2b5d5704 100644 --- a/src/core/utils/ethereum.ts +++ b/src/core/utils/ethereum.ts @@ -4,7 +4,7 @@ import { TransactionResponse } from '@ethersproject/providers'; import { parseEther } from '@ethersproject/units'; import BigNumber from 'bignumber.js'; import omit from 'lodash/omit'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { PrivateKey } from '../keychain/IKeychain'; import { ethUnits } from '../references'; diff --git a/src/core/utils/methodRegistry.ts b/src/core/utils/methodRegistry.ts index ae6c70a12d..65eca14df4 100644 --- a/src/core/utils/methodRegistry.ts +++ b/src/core/utils/methodRegistry.ts @@ -1,9 +1,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Contract, ContractInterface } from '@ethersproject/contracts'; -import { Address, getProvider } from '@wagmi/core'; +import { Address } from 'viem'; import { metadataClient } from '~/core/graphql'; +import { getProvider } from '../wagmi/clientToProvider'; + import { fetchJsonLocally } from './localJson'; const METHOD_REGISTRY_ADDRESS = '0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86'; diff --git a/src/core/utils/rainbowChains.ts b/src/core/utils/rainbowChains.ts new file mode 100644 index 0000000000..815ba031b6 --- /dev/null +++ b/src/core/utils/rainbowChains.ts @@ -0,0 +1,19 @@ +import { rainbowChainsStore } from '../state'; + +export const findRainbowChainForChainId = (chainId: number) => { + const { rainbowChains } = getRainbowChains(); + return rainbowChains.find((chain) => chain.id === chainId); +}; + +export const getRainbowChains = () => { + const { rainbowChains } = rainbowChainsStore.getState(); + return { + rainbowChains: Object.values(rainbowChains) + .map((rainbowChain) => + rainbowChain.chains.find( + (rpc) => rpc.rpcUrls.default.http[0] === rainbowChain.activeRpcUrl, + ), + ) + .filter(Boolean), + }; +}; diff --git a/src/core/utils/signMessages.tsx b/src/core/utils/signMessages.tsx index a529785a01..83853fa53a 100644 --- a/src/core/utils/signMessages.tsx +++ b/src/core/utils/signMessages.tsx @@ -1,6 +1,6 @@ import { getAddress, isAddress } from '@ethersproject/address'; import { Bytes, isHexString } from '@ethersproject/bytes'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { RainbowError, logger } from '~/logger'; @@ -37,7 +37,11 @@ export const getSigningRequestDisplayDetails = ( } catch (error) { // TODO error handling } - return { message, msgData: message, address: getAddress(address) }; + return { + message, + msgData: message, + address: getAddress(address) as Address, + }; } default: { // There's a lot of inconsistency in the parameter order for this method @@ -63,7 +67,7 @@ export const getSigningRequestDisplayDetails = ( return { message: JSON.stringify(sanitizedMessageData, null, 2), msgData: sanitizedMessageData, - address: getAddress(address), + address: getAddress(address) as Address, typedData: true, }; } diff --git a/src/core/utils/transactions.ts b/src/core/utils/transactions.ts index 633c0d42f4..f5e97cee3c 100644 --- a/src/core/utils/transactions.ts +++ b/src/core/utils/transactions.ts @@ -6,9 +6,8 @@ import { TransactionResponse, } from '@ethersproject/providers'; import { formatUnits } from '@ethersproject/units'; -import { getProvider } from '@wagmi/core'; import { isString } from 'lodash'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '../languages'; import { createHttpClient } from '../network/internal/createHttpClient'; @@ -35,6 +34,7 @@ import { isValidTransactionType, transactionTypeShouldHaveChanges, } from '../types/transactions'; +import { getProvider } from '../wagmi/clientToProvider'; import { parseAsset, parseUserAsset, parseUserAssetBalances } from './assets'; import { getBlockExplorerHostForChain, isNativeAsset } from './chains'; @@ -409,7 +409,9 @@ export async function getNextNonce({ const { getNonce } = nonceStore.getState(); const localNonceData = getNonce({ address, chainId }); const localNonce = localNonceData?.currentNonce || 0; + console.log('- getNextNonce'); const provider = getProvider({ chainId }); + console.log('- getNextNonce', provider); const txCountIncludingPending = await provider.getTransactionCount( address, 'pending', diff --git a/src/core/utils/userChains.ts b/src/core/utils/userChains.ts index 51a28b9781..d9a9fc7396 100644 --- a/src/core/utils/userChains.ts +++ b/src/core/utils/userChains.ts @@ -1,4 +1,5 @@ import { + Chain, arbitrum, arbitrumSepolia, avalanche, @@ -8,13 +9,14 @@ import { bsc, bscTestnet, holesky, + mainnet, optimism, optimismSepolia, polygon, + sepolia, zora, zoraSepolia, } from 'viem/chains'; -import { Chain, mainnet, sepolia } from 'wagmi'; import { ChainId, @@ -105,7 +107,7 @@ export const filterUserNetworks = ({ userChains: Record; userChainsOrder: ChainId[]; }) => { - const supportedChains = testnetMode + const supportedChains: Chain[] = testnetMode ? getSupportedTestnetChains() : getSupportedChainsWithHardhat(); diff --git a/src/core/wagmi/clientToProvider.ts b/src/core/wagmi/clientToProvider.ts new file mode 100644 index 0000000000..ed75cb4a0f --- /dev/null +++ b/src/core/wagmi/clientToProvider.ts @@ -0,0 +1,31 @@ +import { Provider } from '@ethersproject/providers'; +import { getClient } from '@wagmi/core'; +import { providers } from 'ethers'; +import type { Chain, Client, Transport } from 'viem'; + +import { wagmiConfig } from '.'; + +export function clientToProvider(client: Client) { + const { chain, transport } = client; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + if (transport.type === 'fallback') + return new providers.FallbackProvider( + (transport.transports as ReturnType[]).map( + ({ value }) => new providers.JsonRpcProvider(value?.url, network), + ), + ) as Provider; + return new providers.JsonRpcProvider(transport.url, network) as Provider; +} + +/** Action to convert a viem Public Client to an ethers.js Provider. */ +export function getProvider({ chainId }: { chainId?: number } = {}) { + const client = getClient(wagmiConfig, { chainId }) as Client< + Transport, + Chain + >; + return clientToProvider(client); +} diff --git a/src/core/wagmi/clientToSigner.ts b/src/core/wagmi/clientToSigner.ts new file mode 100644 index 0000000000..a514586f97 --- /dev/null +++ b/src/core/wagmi/clientToSigner.ts @@ -0,0 +1,23 @@ +import { getConnectorClient } from '@wagmi/core'; +import { providers } from 'ethers'; +import type { Account, Chain, Client, Transport } from 'viem'; + +import { wagmiConfig } from '.'; + +export function clientToSigner(client: Client) { + const { account, chain, transport } = client; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + const provider = new providers.Web3Provider(transport, network); + const signer = provider.getSigner(account.address); + return signer; +} + +/** Action to convert a Viem Client to an ethers.js Signer. */ +export async function getEthersSigner({ chainId }: { chainId?: number } = {}) { + const client = await getConnectorClient(wagmiConfig, { chainId }); + return clientToSigner(client); +} diff --git a/src/core/wagmi/createTestWagmiClient.ts b/src/core/wagmi/createTestWagmiClient.ts deleted file mode 100644 index 3a16327b5a..0000000000 --- a/src/core/wagmi/createTestWagmiClient.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister'; -import { - arbitrum, - avalanche, - base, - bsc, - mainnet, - optimism, - polygon, - zora, -} from 'viem/chains'; -import { - Chain, - CreateClientConfig, - configureChains, - createClient, - createStorage, -} from 'wagmi'; -import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'; - -import { queryClient } from '../react-query'; -import { LocalStorage } from '../storage'; - -const noopStorage = { - getItem: () => '', - setItem: () => null, - removeItem: () => null, -}; - -const { chains, provider, webSocketProvider } = configureChains( - [mainnet, optimism, polygon, arbitrum, base, zora, bsc, avalanche] as Chain[], - [ - jsonRpcProvider({ - rpc: () => { - return { http: 'http://127.0.0.1:8545' }; - }, - }), - ], -); - -const asyncStoragePersister = createAsyncStoragePersister({ - key: 'rainbow.wagmi', - storage: { - getItem: LocalStorage.get, - setItem: LocalStorage.set, - removeItem: LocalStorage.remove, - }, -}); - -export function createTestWagmiClient({ - autoConnect, - connectors, - persist, -}: { - autoConnect?: CreateClientConfig['autoConnect']; - connectors?: (opts: { chains: Chain[] }) => CreateClientConfig['connectors']; - persist?: boolean; -} = {}) { - return createClient({ - autoConnect, - connectors: connectors ? connectors({ chains }) : undefined, - persister: persist ? asyncStoragePersister : undefined, - provider, - // Passing `undefined` will use wagmi's default storage (window.localStorage). - // If `persist` is falsy, we want to pass through a noopStorage. - storage: persist ? undefined : createStorage({ storage: noopStorage }), - queryClient, - webSocketProvider, - }); -} diff --git a/src/core/wagmi/createWagmiClient.ts b/src/core/wagmi/createWagmiClient.ts deleted file mode 100644 index 428de35200..0000000000 --- a/src/core/wagmi/createWagmiClient.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister'; -import { - Chain, - CreateClientConfig, - configureChains, - createClient, - createStorage, -} from 'wagmi'; -import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'; - -import { proxyRpcEndpoint } from '../providers'; -import { queryClient } from '../react-query'; -import { SUPPORTED_CHAINS, getDefaultRPC } from '../references'; -import { LocalStorage } from '../storage'; -import { ChainId, chainHardhat, chainHardhatOptimism } from '../types/chains'; -import { findRainbowChainForChainId } from '../utils/chains'; - -const IS_TESTING = process.env.IS_TESTING === 'true'; - -const noopStorage = { - getItem: () => '', - setItem: () => null, - removeItem: () => null, -}; - -export const getOriginalRpcEndpoint = (chain: Chain) => { - // overrides have preference - const userAddedNetwork = findRainbowChainForChainId(chain.id); - if (userAddedNetwork) { - return { http: userAddedNetwork.rpcUrls.default.http[0] }; - } - if (chain.id === ChainId.hardhat || chain.id === ChainId.hardhatOptimism) { - return { http: chain.rpcUrls.default.http[0] }; - } - - return getDefaultRPC(chain.id); -}; - -const supportedChains = IS_TESTING - ? SUPPORTED_CHAINS.concat(chainHardhat, chainHardhatOptimism) - : SUPPORTED_CHAINS; - -export const configureChainsForWagmiClient = ( - chains: Chain[], - useProxy?: boolean, -) => - configureChains(chains, [ - jsonRpcProvider({ - rpc: (chain) => { - const originalRpcEndpoint = getOriginalRpcEndpoint(chain); - if (originalRpcEndpoint) { - return { - http: useProxy - ? proxyRpcEndpoint(originalRpcEndpoint.http, chain.id) - : originalRpcEndpoint.http, - }; - } - return null; - }, - }), - ]); - -const asyncStoragePersister = createAsyncStoragePersister({ - key: 'rainbow.wagmi', - storage: { - getItem: LocalStorage.get, - setItem: LocalStorage.set, - removeItem: LocalStorage.remove, - }, -}); - -export function createWagmiClient({ - autoConnect, - connectors, - persist, - rainbowChains = supportedChains, - useProxy, -}: { - autoConnect?: CreateClientConfig['autoConnect']; - connectors?: (opts: { chains: Chain[] }) => CreateClientConfig['connectors']; - persist?: boolean; - rainbowChains?: Chain[]; - useProxy?: boolean; -} = {}) { - const { chains, provider, webSocketProvider } = configureChainsForWagmiClient( - rainbowChains, - useProxy, - ); - - return createClient({ - autoConnect, - connectors: connectors - ? connectors({ - chains, - }) - : undefined, - persister: persist ? asyncStoragePersister : undefined, - provider, - // Passing `undefined` will use wagmi's default storage (window.localStorage). - // If `persist` is falsy, we want to pass through a noopStorage. - storage: persist ? undefined : createStorage({ storage: noopStorage }), - queryClient, - webSocketProvider, - }); -} diff --git a/src/core/wagmi/index.ts b/src/core/wagmi/index.ts index 57cb85f1dd..7c1bec2aff 100644 --- a/src/core/wagmi/index.ts +++ b/src/core/wagmi/index.ts @@ -1 +1,84 @@ -export { createWagmiClient } from './createWagmiClient'; +import { useEffect } from 'react'; +import { Chain, HttpTransport, Transport, http } from 'viem'; +import { createConfig } from 'wagmi'; + +import { useRainbowChains } from '~/entries/popup/hooks/useRainbowChains'; + +import { proxyRpcEndpoint } from '../providers'; +import { SUPPORTED_CHAINS, getDefaultRPC } from '../references'; +import { connectedToHardhatStore } from '../state/currentSettings/connectedToHardhat'; +import { ChainId, chainHardhat, chainHardhatOptimism } from '../types/chains'; +import { findRainbowChainForChainId } from '../utils/rainbowChains'; + +const IS_TESTING = process.env.IS_TESTING === 'true'; + +const supportedChains = IS_TESTING + ? [...SUPPORTED_CHAINS, chainHardhat, chainHardhatOptimism] + : SUPPORTED_CHAINS; + +const getOriginalRpcEndpoint = (chain: Chain) => { + const userAddedNetwork = findRainbowChainForChainId(chain.id); + if (userAddedNetwork) { + return userAddedNetwork.rpcUrls.default.http[0]; + } + return getDefaultRPC(chain.id)?.http; +}; + +export const handleRpcUrl = (chain: Chain) => { + if ( + (IS_TESTING && + ((chain.id === ChainId.mainnet && + connectedToHardhatStore.getState().connectedToHardhat) || + (chain.id === ChainId.optimism && + connectedToHardhatStore.getState().connectedToHardhatOp))) || + chain.id === chainHardhat.id || + chain.id === chainHardhatOptimism.id + ) { + return chainHardhat.rpcUrls.default.http[0]; + } else { + return proxyRpcEndpoint(getOriginalRpcEndpoint(chain) || '', chain.id); + } +}; + +const createChains = (chains: Chain[]): [Chain, ...Chain[]] => { + return chains.map((chain) => { + const rpcUrl = handleRpcUrl(chain); + return { + ...chain, + rpcUrls: { + default: { http: [rpcUrl] }, + public: { http: [rpcUrl] }, + }, + } as Chain; + }) as [Chain, ...Chain[]]; +}; + +const createTransports = (chains: Chain[]): Record => { + return chains.reduce((acc: Record, chain) => { + acc[chain.id] = http(handleRpcUrl(chain)); + return acc; + }, {}); +}; + +let wagmiConfig = createConfig({ + chains: createChains(supportedChains), + transports: createTransports(supportedChains), +}); + +const updateWagmiConfig = (chains: Chain[]) => { + wagmiConfig = createConfig({ + chains: createChains(chains), + transports: createTransports(chains), + }); +}; + +const WagmiConfigUpdater = () => { + const { rainbowChains: chains } = useRainbowChains(); + useEffect(() => { + updateWagmiConfig(chains); + }, [chains]); + + return null; +}; + +export { wagmiConfig, WagmiConfigUpdater, updateWagmiConfig }; diff --git a/src/entries/background/handlers/handleProviderRequest.ts b/src/entries/background/handlers/handleProviderRequest.ts index fc007b5298..994fa68810 100644 --- a/src/entries/background/handlers/handleProviderRequest.ts +++ b/src/entries/background/handlers/handleProviderRequest.ts @@ -2,8 +2,7 @@ import { AddEthereumChainProposedChain, handleProviderRequest as rnbwHandleProviderRequest, } from '@rainbow-me/provider'; -import { Chain, getProvider } from '@wagmi/core'; -import { UserRejectedRequestError } from 'wagmi'; +import { Chain, UserRejectedRequestError } from 'viem'; import { event } from '~/analytics/event'; import { queueEventTracking } from '~/analytics/queueEvent'; @@ -26,6 +25,7 @@ import { isCustomChain, isSupportedChainId } from '~/core/utils/chains'; import { getDappHost, isValidUrl } from '~/core/utils/connectedApps'; import { POPUP_DIMENSIONS } from '~/core/utils/dimensions'; import { WELCOME_URL, goToNewTab } from '~/core/utils/tabs'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { IN_DAPP_NOTIFICATION_STATUS } from '~/entries/iframe/notification'; import { RainbowError, logger } from '~/logger'; @@ -125,7 +125,7 @@ const messengerProviderRequest = async ( ), ); if (!payload) { - throw new UserRejectedRequestError('User rejected the request.'); + throw new UserRejectedRequestError(Error('User rejected the request.')); } return payload; }; @@ -247,8 +247,9 @@ export const handleProviderRequest = ({ isSupportedChainId(chainId) || isCustomChain(chainId), getActiveSession: ({ host }: { host: string }) => appSessionsStore.getState().getActiveSession({ host }), - getChain: (chainId: number) => - SUPPORTED_CHAINS.find((chain) => chain.id === Number(chainId)), + getChainNativeCurrency: (chainId: number) => + SUPPORTED_CHAINS.find((chain) => chain.id === Number(chainId)) + ?.nativeCurrency, getFeatureFlags: () => featureFlagsStore.getState().featureFlags, getProvider: getProvider, messengerProviderRequest: (request: ProviderRequestPayload) => @@ -279,7 +280,6 @@ export const handleProviderRequest = ({ id: Number(chainId), nativeCurrency: { name, symbol, decimals }, name: proposedChain.chainName, - network: proposedChain.chainName, rpcUrls: { default: { http: [rpcUrl] }, public: { http: [rpcUrl] }, diff --git a/src/entries/background/handlers/handleWallets.ts b/src/entries/background/handlers/handleWallets.ts index 3947709e91..ec346f2bf9 100644 --- a/src/entries/background/handlers/handleWallets.ts +++ b/src/entries/background/handlers/handleWallets.ts @@ -5,8 +5,7 @@ import { } from '@ethersproject/abstract-signer'; import { Bytes } from '@ethersproject/bytes'; import { ChainId } from '@rainbow-me/swaps'; -import { getProvider } from '@wagmi/core'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { addAccountAtIndex, @@ -42,6 +41,8 @@ import { flashbotsEnabledStore } from '~/core/state'; import { WalletAction } from '~/core/types/walletActions'; import { EthereumWalletSeed } from '~/core/utils/ethereum'; import { getFlashbotsProvider } from '~/core/utils/flashbots'; +import { wagmiConfig } from '~/core/wagmi'; +import { getProvider } from '~/core/wagmi/clientToProvider'; type WalletActionArguments = { action: WalletAction; @@ -187,9 +188,12 @@ export const handleWallets = () => ) { provider = getFlashbotsProvider(); } else { + console.log('get background provider'); + console.log('get background wagmiconfig', wagmiConfig); provider = getProvider({ chainId: (payload as TransactionRequest).chainId, }); + console.log(' background provider', provider); } response = await sendTransaction( payload as TransactionRequest, diff --git a/src/entries/background/index.ts b/src/entries/background/index.ts index 1a22dd59ce..7096533383 100644 --- a/src/entries/background/index.ts +++ b/src/entries/background/index.ts @@ -4,8 +4,8 @@ import { initFCM } from '~/core/firebase/fcm'; import { initializeMessenger } from '~/core/messengers'; import { initializeSentry } from '~/core/sentry'; import { syncStores } from '~/core/state/internal/syncStores'; -import { getRainbowChains } from '~/core/utils/chains'; -import { createWagmiClient } from '~/core/wagmi'; +import { getRainbowChains } from '~/core/utils/rainbowChains'; +import { updateWagmiConfig } from '~/core/wagmi'; import { handleDisconnect } from './handlers/handleDisconnect'; import { handleInstallExtension } from './handlers/handleInstallExtension'; @@ -19,15 +19,6 @@ require('../../core/utils/lockdown'); initializeSentry('background'); -const updateWagmiClient = ({ - rpcProxyEnabled, -}: { - rpcProxyEnabled: boolean; -}) => { - const { rainbowChains } = getRainbowChains(); - createWagmiClient({ rainbowChains, useProxy: rpcProxyEnabled }); -}; - const popupMessenger = initializeMessenger({ connect: 'popup' }); const inpageMessenger = initializeMessenger({ connect: 'inpage' }); @@ -43,13 +34,7 @@ uuid4(); initFCM(); handleKeepAlive(); -setTimeout(() => { - updateWagmiClient({ rpcProxyEnabled: true }); -}, 100); - -popupMessenger.reply( - 'rainbow_updateWagmiClient', - async (payload: { rpcProxyEnabled: boolean }) => { - updateWagmiClient({ rpcProxyEnabled: payload.rpcProxyEnabled }); - }, -); +popupMessenger.reply('rainbow_updateWagmiClient', async () => { + const { rainbowChains } = getRainbowChains(); + updateWagmiConfig(rainbowChains); +}); diff --git a/src/entries/inpage/index.ts b/src/entries/inpage/index.ts index 105f530eab..39b6b0a521 100644 --- a/src/entries/inpage/index.ts +++ b/src/entries/inpage/index.ts @@ -1,6 +1,5 @@ import { RainbowProvider } from '@rainbow-me/provider'; import { uuid4 } from '@sentry/utils'; -import { Ethereum } from '@wagmi/core'; import _ from 'lodash'; import { EIP1193Provider, announceProvider } from 'mipd'; @@ -18,17 +17,17 @@ declare global { interface Window { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - clashes with Wagmi's Window type https://github.com/wagmi-dev/wagmi/blob/a25ddf534781b2da81ee6aba307b93750efc5595/packages/core/src/types/index.ts#L77 - ethereum: RainbowProvider | Ethereum; + ethereum: RainbowProvider; lodash: unknown; rainbow: RainbowProvider; - providers: (RainbowProvider | Ethereum)[]; + providers: RainbowProvider[]; walletRouter: { rainbowProvider: RainbowProvider; - lastInjectedProvider?: RainbowProvider | Ethereum; - currentProvider: RainbowProvider | Ethereum; - providers: (RainbowProvider | Ethereum)[]; + lastInjectedProvider?: RainbowProvider; + currentProvider: RainbowProvider; + providers: RainbowProvider[]; setDefaultProvider: (rainbowAsDefault: boolean) => void; - addProvider: (provider: RainbowProvider | Ethereum) => void; + addProvider: (provider: RainbowProvider) => void; }; } } @@ -128,12 +127,11 @@ if (shouldInjectProvider()) { window.walletRouter.currentProvider = window.rainbow; } else { const nonDefaultProvider = - window.walletRouter.lastInjectedProvider ?? - (window.ethereum as Ethereum); + window.walletRouter.lastInjectedProvider ?? window.ethereum; window.walletRouter.currentProvider = nonDefaultProvider; } }, - addProvider(provider: RainbowProvider | Ethereum) { + addProvider(provider: RainbowProvider) { if (!window.walletRouter.providers.includes(provider)) { window.walletRouter.providers.push(provider); } diff --git a/src/entries/popup/App.tsx b/src/entries/popup/App.tsx index dae8dfafbd..05fbe13fa4 100644 --- a/src/entries/popup/App.tsx +++ b/src/entries/popup/App.tsx @@ -1,7 +1,8 @@ +import { QueryClientProvider } from '@tanstack/react-query'; import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client'; import { isEqual } from 'lodash'; import * as React from 'react'; -import { WagmiConfig } from 'wagmi'; +import { WagmiProvider } from 'wagmi'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; @@ -15,7 +16,7 @@ import { initializeSentry, setSentryUser } from '~/core/sentry'; import { useCurrentLanguageStore, useDeviceIdStore } from '~/core/state'; import { useCurrentThemeStore } from '~/core/state/currentSettings/currentTheme'; import { POPUP_DIMENSIONS } from '~/core/utils/dimensions'; -import { createWagmiClient } from '~/core/wagmi'; +import { WagmiConfigUpdater, wagmiConfig } from '~/core/wagmi'; import { Box, ThemeProvider } from '~/design-system'; import { Routes } from './Routes'; @@ -27,10 +28,7 @@ import { useExpiryListener } from './hooks/useExpiryListener'; import { useIsFullScreen } from './hooks/useIsFullScreen'; import usePrevious from './hooks/usePrevious'; import { useRainbowChains } from './hooks/useRainbowChains'; -import { PlaygroundComponents } from './pages/_playgrounds'; -import { RainbowConnector } from './wagmi/RainbowConnector'; -const playground = process.env.PLAYGROUND as 'default' | 'ds'; const backgroundMessenger = initializeMessenger({ connect: 'background' }); export function App() { @@ -49,18 +47,6 @@ export function App() { } }, [prevChains, rainbowChains]); - const wagmiClient = React.useMemo( - () => - createWagmiClient({ - autoConnect: true, - connectors: ({ chains }) => [new RainbowConnector({ chains })], - persist: true, - rainbowChains, - useProxy: config.rpc_proxy_enabled, - }), - [rainbowChains], - ); - React.useEffect(() => { if (!isEqual(prevChains, rainbowChains)) { backgroundMessenger.send('rainbow_updateWagmiClient', { @@ -103,15 +89,13 @@ export function App() { return ( <> - - - - {playground ? ( - PlaygroundComponents[playground] - ) : ( + + + + + - )} - - - + + + + ); diff --git a/src/entries/popup/components/AccountItem/AccountItem.tsx b/src/entries/popup/components/AccountItem/AccountItem.tsx index 9ee70c03a3..f008bc4d83 100644 --- a/src/entries/popup/components/AccountItem/AccountItem.tsx +++ b/src/entries/popup/components/AccountItem/AccountItem.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { supportedCurrencies } from '~/core/references'; import { diff --git a/src/entries/popup/components/AccountName/AccountName.tsx b/src/entries/popup/components/AccountName/AccountName.tsx index cb00ae3c8e..416613a3f2 100644 --- a/src/entries/popup/components/AccountName/AccountName.tsx +++ b/src/entries/popup/components/AccountName/AccountName.tsx @@ -1,8 +1,8 @@ /* eslint-disable react/jsx-props-no-spreading */ import { motion } from 'framer-motion'; import React, { ReactNode, useCallback, useState } from 'react'; -import { useAccount } from 'wagmi'; +import { useCurrentAddressStore } from '~/core/state'; import { Box, Column, Columns, Symbol, TextOverflow } from '~/design-system'; import { Lens } from '~/design-system/components/Lens/Lens'; import { transformScales } from '~/design-system/styles/designTokens'; @@ -35,7 +35,7 @@ export function AccountName({ tabIndex, renderTooltip, }: AccountNameProps) { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { displayName } = useWalletName({ address: address || '0x' }); const navigate = useRainbowNavigate(); const [hover, setHover] = useState(false); diff --git a/src/entries/popup/components/AddressDisplay.tsx b/src/entries/popup/components/AddressDisplay.tsx index 1aa8236c27..63d2b98e63 100644 --- a/src/entries/popup/components/AddressDisplay.tsx +++ b/src/entries/popup/components/AddressDisplay.tsx @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/components/AddressOrEns/AddressorEns.tsx b/src/entries/popup/components/AddressOrEns/AddressorEns.tsx index fedfc7f3f8..565c8f8699 100644 --- a/src/entries/popup/components/AddressOrEns/AddressorEns.tsx +++ b/src/entries/popup/components/AddressOrEns/AddressorEns.tsx @@ -1,5 +1,6 @@ import { CSSProperties } from 'react'; -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { truncateAddress } from '~/core/utils/address'; import { isENSAddressFormat } from '~/core/utils/ethereum'; diff --git a/src/entries/popup/components/AddressPill/AddressPill.tsx b/src/entries/popup/components/AddressPill/AddressPill.tsx index 2b8af9c79d..65b848ed3e 100644 --- a/src/entries/popup/components/AddressPill/AddressPill.tsx +++ b/src/entries/popup/components/AddressPill/AddressPill.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { Box, Inline, TextOverflow } from '~/design-system'; diff --git a/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItem.tsx b/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItem.tsx index 7f8d6e8d99..246b5d4826 100644 --- a/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItem.tsx +++ b/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItem.tsx @@ -1,6 +1,6 @@ import { AnimatePresence, motion } from 'framer-motion'; import React, { useCallback, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import appConnectionWalletItemImageMask from 'static/assets/appConnectionWalletItemImageMask.svg'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItemDropdownMenu.tsx b/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItemDropdownMenu.tsx index 6f8f273f95..aa1223be37 100644 --- a/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItemDropdownMenu.tsx +++ b/src/entries/popup/components/AppConnection/AppConnectionWalletItem/AppConnectionWalletItemDropdownMenu.tsx @@ -1,5 +1,5 @@ import { useCallback, useRef, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; diff --git a/src/entries/popup/components/AppConnectionMenu/AppConnectionMenuHeader.tsx b/src/entries/popup/components/AppConnectionMenu/AppConnectionMenuHeader.tsx index a94929a84d..b03b563da1 100644 --- a/src/entries/popup/components/AppConnectionMenu/AppConnectionMenuHeader.tsx +++ b/src/entries/popup/components/AppConnectionMenu/AppConnectionMenuHeader.tsx @@ -1,6 +1,6 @@ import { motion } from 'framer-motion'; import React from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { ChainNameDisplay } from '~/core/types/chains'; diff --git a/src/entries/popup/components/CommandK/SearchItems.ts b/src/entries/popup/components/CommandK/SearchItems.ts index 391a74d278..678a358e0f 100644 --- a/src/entries/popup/components/CommandK/SearchItems.ts +++ b/src/entries/popup/components/CommandK/SearchItems.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { ParsedUserAsset, ZerionAssetPrice } from '~/core/types/assets'; import { UniqueAsset } from '~/core/types/nfts'; diff --git a/src/entries/popup/components/CommandK/useCommands.tsx b/src/entries/popup/components/CommandK/useCommands.tsx index 434299ee47..aa1c0efa72 100644 --- a/src/entries/popup/components/CommandK/useCommands.tsx +++ b/src/entries/popup/components/CommandK/useCommands.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { To } from 'react-router-dom'; -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; @@ -927,8 +928,8 @@ export const useCommands = ( isFirefox ? triggerAlert({ text: i18n.t('alert.no_hw_ff') }) : navigate(ROUTES.HW_CHOOSE, { - state: { direction: 'upRight', navbarIcon: 'ex' }, - }); + state: { direction: 'upRight', navbarIcon: 'ex' }, + }); }, }, diff --git a/src/entries/popup/components/CommandK/useSearchableContacts.ts b/src/entries/popup/components/CommandK/useSearchableContacts.ts index 8cbd21d298..17678487cf 100644 --- a/src/entries/popup/components/CommandK/useSearchableContacts.ts +++ b/src/entries/popup/components/CommandK/useSearchableContacts.ts @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/components/CommandK/useSearchableNFTs.ts b/src/entries/popup/components/CommandK/useSearchableNFTs.ts index 3b27272d12..83f74b081b 100644 --- a/src/entries/popup/components/CommandK/useSearchableNFTs.ts +++ b/src/entries/popup/components/CommandK/useSearchableNFTs.ts @@ -26,10 +26,13 @@ export const useSearchableNFTs = () => { const { testnetMode } = useTestnetModeStore(); const { chains: userChains } = useUserChains(); - const { data } = useNfts({ address, testnetMode, userChains }); + const userChainIds = userChains.map(({ id }) => id); + const { data: nfts = [] } = useNfts( + { address, testnetMode, userChainIds }, + { select: (data) => selectNfts(data) }, + ); const searchableNFTs = useMemo(() => { - const nfts = selectNfts(data) || []; return nfts.map((nft) => ({ action: () => navigate( @@ -46,7 +49,7 @@ export const useSearchableNFTs = () => { downrank: true, nft, })); - }, [address, data, navigate]); + }, [address, navigate, nfts]); return { searchableNFTs }; }; diff --git a/src/entries/popup/components/CommandK/useSearchableWallets.ts b/src/entries/popup/components/CommandK/useSearchableWallets.ts index 0df5d2c85c..c7de453321 100644 --- a/src/entries/popup/components/CommandK/useSearchableWallets.ts +++ b/src/entries/popup/components/CommandK/useSearchableWallets.ts @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useCurrentAddressStore } from '~/core/state'; import { truncateAddress } from '~/core/utils/address'; diff --git a/src/entries/popup/components/ContextMenu/ContextMenu.tsx b/src/entries/popup/components/ContextMenu/ContextMenu.tsx index 412b3e7825..86da4a388f 100644 --- a/src/entries/popup/components/ContextMenu/ContextMenu.tsx +++ b/src/entries/popup/components/ContextMenu/ContextMenu.tsx @@ -9,9 +9,9 @@ import React, { useRef, useState, } from 'react'; -import { useAccount } from 'wagmi'; import { shortcuts } from '~/core/references/shortcuts'; +import { useCurrentAddressStore } from '~/core/state'; import { useCurrentThemeStore } from '~/core/state/currentSettings/currentTheme'; import { hasChildren } from '~/core/utils/react'; import { @@ -58,7 +58,7 @@ interface ContextMenuTriggerProps { export const ContextMenuTrigger = (props: ContextMenuTriggerProps) => { const { children, accentColor, asChild, disabled } = props; - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: avatar } = useAvatar({ addressOrName: address }); const triggerRef = useRef(null); @@ -158,7 +158,7 @@ const ContextMenuContentBody = React.forwardRef< onPointerDownOutside, } = props; const { currentTheme } = useCurrentThemeStore(); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: avatar } = useAvatar({ addressOrName: address }); return ( (null); @@ -128,7 +128,7 @@ export const DropdownMenuContentBody = React.forwardRef< animate = false, } = props; const { currentTheme } = useCurrentThemeStore(); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: avatar } = useAvatar({ addressOrName: address }); return ( , @@ -203,14 +202,15 @@ export const useValidateInput = (input: string) => { const { data: addressFromEns, isFetching: isFetchingEns } = useEnsAddress({ name: input, - enabled: isInputEns, - chainId: ChainId.mainnet, + query: { + enabled: isInputEns, + }, }); const savedNames = useSavedEnsNames.use.savedNames(); const isLoading = isFetchingEns; - const inputAddress = addressFromEns || input; + const inputAddress = (addressFromEns || input) as Address; const address = isAddress(inputAddress) ? inputAddress : undefined; const { allWallets } = useWallets(); @@ -255,7 +255,6 @@ export const WatchWallet = ({ isLoading, isValid: inputIsValid, error, - isInputEns, } = useValidateInput(input.trim()); const addressesToImport = useMemo( @@ -267,16 +266,9 @@ export const WatchWallet = ({ const save = useSavedEnsNames.use.save(); const [renameAccount, setRenameAccount] = useState
(); - const { data: ensFromAddress, isFetching: isFetchingAddressEns } = useEnsName( - { - address, - enabled: !isInputEns && !!address, - chainId: ChainId.mainnet, - }, - ); const isValid = input - ? inputIsValid && !isFetchingAddressEns + ? inputIsValid && !isLoading : !!addressesToImport.length; const handleWatchWallet = useCallback(async () => { @@ -291,13 +283,12 @@ export const WatchWallet = ({ save(ensName, address); } setCurrentAddress(importedAddresses[0]); - if (!onboarding && !ensName && !ensFromAddress) setRenameAccount(address); + if (!onboarding && !ensName) setRenameAccount(address); else onFinishImporting?.(); } }, [ addressesToImport, ensName, - ensFromAddress, address, setCurrentAddress, onboarding, @@ -392,7 +383,7 @@ export const WatchWallet = ({ marginTop="-24px" paddingLeft="12px" > - {(isLoading || isFetchingAddressEns) && ( + {isLoading && ( => { const { selectedGas } = gasStore.getState(); + console.log('get provider', transactionRequest.chainId); const provider = getProvider({ chainId: transactionRequest.chainId, }); + console.log(' provider', provider); const gasLimit = await estimateGasWithPadding({ transactionRequest, provider, @@ -158,6 +160,7 @@ export const sendTransaction = async ( throw new Error('Unsupported hardware wallet'); } } else { + console.log('about to send'); const transactionResponse = await walletAction( 'send_transaction', params, diff --git a/src/entries/popup/handlers/walletVariables.tsx b/src/entries/popup/handlers/walletVariables.tsx index f30af68919..abacd4dc52 100644 --- a/src/entries/popup/handlers/walletVariables.tsx +++ b/src/entries/popup/handlers/walletVariables.tsx @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; export const HARDWARE_WALLETS = { MOCK_ACCOUNT: { diff --git a/src/entries/popup/hooks/send/useAllFilteredWallets.ts b/src/entries/popup/hooks/send/useAllFilteredWallets.ts index b98317f5b8..ec2e53d942 100644 --- a/src/entries/popup/hooks/send/useAllFilteredWallets.ts +++ b/src/entries/popup/hooks/send/useAllFilteredWallets.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { Contact } from '~/core/state/contacts'; import { KeychainType } from '~/core/types/keychainTypes'; diff --git a/src/entries/popup/hooks/send/useSendState.ts b/src/entries/popup/hooks/send/useSendState.ts index 40398615c0..42091ccd95 100644 --- a/src/entries/popup/hooks/send/useSendState.ts +++ b/src/entries/popup/hooks/send/useSendState.ts @@ -1,5 +1,5 @@ import { useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useCurrentAddressStore, useCurrentCurrencyStore } from '~/core/state'; import { usePopupInstanceStore } from '~/core/state/popupInstances'; @@ -108,8 +108,8 @@ export const useSendState = ({ toAddressOrName, chainId, data, - fromAddress, - toAddress, + fromAddress: fromAddress as Address, + toAddress: toAddress as Address | undefined, toEnsName, txToAddress, value, diff --git a/src/entries/popup/hooks/send/useSendUniqueAsset.ts b/src/entries/popup/hooks/send/useSendUniqueAsset.ts index 853a9edaec..6f043319be 100644 --- a/src/entries/popup/hooks/send/useSendUniqueAsset.ts +++ b/src/entries/popup/hooks/send/useSendUniqueAsset.ts @@ -22,10 +22,12 @@ export const useSendUniqueAsset = () => { const [selectedNftCollectionId, setSelectedNftCollectionId] = useState(''); const { chains: userChains } = useUserChains(); - const { data } = useNfts({ address, testnetMode, userChains }); - const sectionsDictionary = useMemo(() => { - return selectNftCollections(data); - }, [data]); + const userChainIds = userChains.map(({ id }) => id); + + const { data: sectionsDictionary = {} } = useNfts( + { address, testnetMode, userChainIds }, + { select: (data) => selectNftCollections(data) }, + ); const sortedSections = useMemo(() => { const sections = Object.values(sectionsDictionary); return sortMethod === 'alphabetical' diff --git a/src/entries/popup/hooks/send/useSendValidations.ts b/src/entries/popup/hooks/send/useSendValidations.ts index f52a725e82..825e226e54 100644 --- a/src/entries/popup/hooks/send/useSendValidations.ts +++ b/src/entries/popup/hooks/send/useSendValidations.ts @@ -1,7 +1,6 @@ import { isValidAddress } from '@ethereumjs/util'; -import { getProvider } from '@wagmi/core'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { ParsedUserAsset } from '~/core/types/assets'; @@ -16,6 +15,7 @@ import { lessOrEqualThan, lessThan, } from '~/core/utils/numbers'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { useNativeAsset } from '../useNativeAsset'; diff --git a/src/entries/popup/hooks/swap/useSwapAssetsRefresh.tsx b/src/entries/popup/hooks/swap/useSwapAssetsRefresh.tsx index b941112122..e64570ce51 100644 --- a/src/entries/popup/hooks/swap/useSwapAssetsRefresh.tsx +++ b/src/entries/popup/hooks/swap/useSwapAssetsRefresh.tsx @@ -1,6 +1,6 @@ -import { getProvider } from '@wagmi/core'; import { useCallback, useEffect, useRef } from 'react'; +import { ETH_ADDRESS } from '~/core/references'; import { selectUserAssetsDictByChain, selectorFilterByUserChains, @@ -14,6 +14,7 @@ import { import { useCurrentAddressStore, useCurrentCurrencyStore } from '~/core/state'; import { useSwapAssetsToRefreshStore } from '~/core/state/swapAssetsToRefresh'; import { fetchAssetBalanceViaProvider } from '~/core/utils/assets'; +import { getProvider } from '~/core/wagmi/clientToProvider'; export const useSwapRefreshAssets = () => { const { currentAddress } = useCurrentAddressStore(); @@ -49,30 +50,26 @@ export const useSwapRefreshAssets = () => { const [assetToBuy, assetToSell] = assetsToRefresh; const updatedAssets = userAssets; - const assetToBuyProvider = getProvider({ chainId: assetToBuy?.chainId }); - const assetToSellProvider = getProvider({ - chainId: assetToSell?.chainId, - }); - const [updatedAssetToBuy, updatedAssetToSell] = await Promise.all([ - fetchAssetBalanceViaProvider({ - parsedAsset: assetToBuy, - currentAddress, - currency: currentCurrency, - provider: assetToBuyProvider, - }), - fetchAssetBalanceViaProvider({ - parsedAsset: assetToSell, - currentAddress, - currency: currentCurrency, - provider: assetToSellProvider, - }), - ]); + const fetchAssetPromises = [assetToBuy, assetToSell] + .map( + (asset) => + asset.address !== ETH_ADDRESS && + fetchAssetBalanceViaProvider({ + parsedAsset: asset, + currentAddress, + currency: currentCurrency, + provider: getProvider({ chainId: asset.chainId }), + }), + ) + .filter(Boolean); + + const assets = await Promise.all(fetchAssetPromises); - updatedAssets[assetToBuy.chainId][updatedAssetToBuy.uniqueId] = - updatedAssetToBuy; - updatedAssets[assetToSell.chainId][updatedAssetToSell.uniqueId] = - updatedAssetToSell; + assets.forEach((asset) => { + if (!asset) return; + updatedAssets[asset.chainId][asset.uniqueId] = asset; + }); userAssetsSetQueryData({ address: currentAddress, diff --git a/src/entries/popup/hooks/swap/useSwapQuote.ts b/src/entries/popup/hooks/swap/useSwapQuote.ts index e8d4a310ec..2d273227d4 100644 --- a/src/entries/popup/hooks/swap/useSwapQuote.ts +++ b/src/entries/popup/hooks/swap/useSwapQuote.ts @@ -113,7 +113,7 @@ export const useSwapQuote = ({ queryKey: ['getSwapQuote', quotesParams], enabled: !!quotesParams, refetchInterval: SWAP_POLLING_INTERVAL, - cacheTime: CACHE_INTERVAL, + gcTime: CACHE_INTERVAL, }); const isWrapOrUnwrapEth = useMemo(() => { diff --git a/src/entries/popup/hooks/swap/useSwapSlippage.tsx b/src/entries/popup/hooks/swap/useSwapSlippage.tsx index 1072259643..b950c9b8c6 100644 --- a/src/entries/popup/hooks/swap/useSwapSlippage.tsx +++ b/src/entries/popup/hooks/swap/useSwapSlippage.tsx @@ -1,7 +1,7 @@ import { getSlippage } from '@rainbow-me/swaps'; import { useQuery } from '@tanstack/react-query'; import { BigNumberish } from 'ethers'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { QueryConfig, @@ -100,8 +100,8 @@ export function useSwapSlippage( SwapSlippageQueryKey > = {}, ) { - return useQuery( - swapSlippageQueryKey({ + return useQuery({ + queryKey: swapSlippageQueryKey({ chainId, toChainId, sellTokenAddress, @@ -109,11 +109,9 @@ export function useSwapSlippage( sellAmount, buyAmount, }), - swapSlippageQueryFunction, - { - ...config, - retry: true, - staleTime: 10 * 60 * 1_000, // 10 min - }, - ); + queryFn: swapSlippageQueryFunction, + ...config, + retry: true, + staleTime: 10 * 60 * 1_000, // 10 min + }); } diff --git a/src/entries/popup/hooks/useAccounts.ts b/src/entries/popup/hooks/useAccounts.ts index d7adbca498..9a0c1cf2c8 100644 --- a/src/entries/popup/hooks/useAccounts.ts +++ b/src/entries/popup/hooks/useAccounts.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useWalletNamesStore } from '~/core/state/walletNames'; import { useWalletOrderStore } from '~/core/state/walletOrder'; diff --git a/src/entries/popup/hooks/useActivityShortcuts.ts b/src/entries/popup/hooks/useActivityShortcuts.ts index f84f0cbb6a..aeb64c45d6 100644 --- a/src/entries/popup/hooks/useActivityShortcuts.ts +++ b/src/entries/popup/hooks/useActivityShortcuts.ts @@ -1,5 +1,5 @@ import { useCallback } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; diff --git a/src/entries/popup/hooks/useAppSession.ts b/src/entries/popup/hooks/useAppSession.ts index 20a494c9a9..f1e7d58141 100644 --- a/src/entries/popup/hooks/useAppSession.ts +++ b/src/entries/popup/hooks/useAppSession.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { initializeMessenger } from '~/core/messengers'; import { useAppSessionsStore } from '~/core/state'; diff --git a/src/entries/popup/hooks/useAvatar.ts b/src/entries/popup/hooks/useAvatar.ts index 221a2b7689..d1021d3812 100644 --- a/src/entries/popup/hooks/useAvatar.ts +++ b/src/entries/popup/hooks/useAvatar.ts @@ -49,20 +49,18 @@ export function useAvatar({ }) { const { walletAvatar } = useWalletAvatarStore(); - return useQuery( - ['walletAvatar', addressOrName], - async () => + return useQuery({ + queryKey: ['walletAvatar', addressOrName], + queryFn: async () => addressOrName ? fetchWalletAvatar({ addressOrName, avatarUrl }) : undefined, - { - enabled: !!addressOrName, - staleTime: 1 * 60 * 1_000, // 1 min - initialData: () => { - return addressOrName && walletAvatar - ? walletAvatar[addressOrName] - : undefined; - }, + enabled: !!addressOrName, + staleTime: 1 * 60 * 1_000, // 1 min + initialData: () => { + return addressOrName && walletAvatar + ? walletAvatar[addressOrName] + : undefined; }, - ); + }); } diff --git a/src/entries/popup/hooks/useContacts.ts b/src/entries/popup/hooks/useContacts.ts index 53e39c2044..89f8308054 100644 --- a/src/entries/popup/hooks/useContacts.ts +++ b/src/entries/popup/hooks/useContacts.ts @@ -1,4 +1,5 @@ -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { ContactsStore, useContactsStore } from '~/core/state/contacts'; diff --git a/src/entries/popup/hooks/useCustomNetworkAsset.ts b/src/entries/popup/hooks/useCustomNetworkAsset.ts index ed1b5c060e..b75c5a58c4 100644 --- a/src/entries/popup/hooks/useCustomNetworkAsset.ts +++ b/src/entries/popup/hooks/useCustomNetworkAsset.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { selectUserAssetWithUniqueId } from '~/core/resources/_selectors/assets'; import { useCustomNetworkAssets } from '~/core/resources/assets/customNetworkAssets'; diff --git a/src/entries/popup/hooks/useDominantColor.ts b/src/entries/popup/hooks/useDominantColor.ts index 367a1f4ade..4d083a95d3 100644 --- a/src/entries/popup/hooks/useDominantColor.ts +++ b/src/entries/popup/hooks/useDominantColor.ts @@ -25,14 +25,12 @@ export const fetchDominantColor = async ({ }; export function useDominantColor({ imageUrl }: { imageUrl?: string }) { const { colorCache } = useColorCacheStore(); - return useQuery( - ['color', imageUrl], - async () => fetchDominantColor({ imageUrl }), - { - enabled: !!imageUrl, - initialData: () => { - return imageUrl ? colorCache[imageUrl] : undefined; - }, + return useQuery({ + queryKey: ['color', imageUrl], + queryFn: async () => fetchDominantColor({ imageUrl }), + enabled: !!imageUrl, + initialData: () => { + return imageUrl ? colorCache[imageUrl] : undefined; }, - ); + }); } diff --git a/src/entries/popup/hooks/useEnhanceWithEnsNames.ts b/src/entries/popup/hooks/useEnhanceWithEnsNames.ts index 7140da3aec..71fb36beb4 100644 --- a/src/entries/popup/hooks/useEnhanceWithEnsNames.ts +++ b/src/entries/popup/hooks/useEnhanceWithEnsNames.ts @@ -1,7 +1,9 @@ import { useQueries } from '@tanstack/react-query'; -import { Address, FetchEnsNameResult, fetchEnsName } from '@wagmi/core'; +import { getEnsName } from '@wagmi/core'; +import { Address, GetEnsNameReturnType } from 'viem'; import { ChainId } from '~/core/types/chains'; +import { wagmiConfig } from '~/core/wagmi'; // Initially returns the same "accounts" list, and update the list with ensName after fetching export const useEnhanceWithEnsNames = < @@ -12,10 +14,10 @@ export const useEnhanceWithEnsNames = < }: { accounts: TAccounts; chainId?: ChainId; -}): (TAccounts[number] & { ensName?: FetchEnsNameResult })[] => { +}): (TAccounts[number] & { ensName?: GetEnsNameReturnType })[] => { const queries = useQueries({ queries: accounts.map((account) => ({ - queryFn: () => fetchEnsName({ chainId, address: account.address }), + queryFn: () => getEnsName(wagmiConfig, { address: account.address }), queryKey: [{ entity: 'ensName', address: account.address, chainId }], // same as wagmi query key so we share the cache refetchOnWindowFocus: false, staleTime: 20 * 1000, // 20s diff --git a/src/entries/popup/hooks/useEns.ts b/src/entries/popup/hooks/useEns.ts index d42d0e7c52..6769f5414e 100644 --- a/src/entries/popup/hooks/useEns.ts +++ b/src/entries/popup/hooks/useEns.ts @@ -1,5 +1,6 @@ import { isAddress } from '@ethersproject/address'; -import { Address, useEnsAddress, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsAddress, useEnsName } from 'wagmi'; import { useENSProfile } from '~/core/resources/metadata/ensProfile'; import { isENSAddressFormat } from '~/core/utils/ethereum'; @@ -13,11 +14,10 @@ export const useEns = ({ }) => { const { data: ensAddress } = useEnsAddress({ name: addressOrName, - enabled: isENSAddressFormat(addressOrName), }); const { data: ensName } = useEnsName({ address: addressOrName as Address, - enabled: isAddress(addressOrName), + query: { enabled: isAddress(addressOrName) }, }); const { data: ensProfile } = useENSProfile( { diff --git a/src/entries/popup/hooks/useGas.ts b/src/entries/popup/hooks/useGas.ts index fc7fd52faf..d68b58c402 100644 --- a/src/entries/popup/hooks/useGas.ts +++ b/src/entries/popup/hooks/useGas.ts @@ -2,7 +2,7 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { CrosschainQuote, Quote, QuoteError } from '@rainbow-me/swaps'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { gasUnits } from '~/core/references'; import { useEstimateGasLimit, useGasData } from '~/core/resources/gas'; diff --git a/src/entries/popup/hooks/useInfiniteTransactionList.ts b/src/entries/popup/hooks/useInfiniteTransactionList.ts index 3cfd004ffe..dbb18e66c2 100644 --- a/src/entries/popup/hooks/useInfiniteTransactionList.ts +++ b/src/entries/popup/hooks/useInfiniteTransactionList.ts @@ -165,7 +165,7 @@ export const useInfiniteTransactionList = ({ fetchNextPage(); } }, [ - data?.pages.length, + data?.pages?.length, fetchNextPage, hasNextPage, isFetching, diff --git a/src/entries/popup/hooks/useNativeAsset.ts b/src/entries/popup/hooks/useNativeAsset.ts index 67d9c6327a..619b467049 100644 --- a/src/entries/popup/hooks/useNativeAsset.ts +++ b/src/entries/popup/hooks/useNativeAsset.ts @@ -1,5 +1,6 @@ import { AddressZero } from '@ethersproject/constants'; -import { Address, useNetwork } from 'wagmi'; +import { Address } from 'viem'; +import { useConfig } from 'wagmi'; import { useUserTestnetNativeAsset } from '~/core/resources/assets/userTestnetNativeAsset'; import { useCurrentAddressStore, useCurrentCurrencyStore } from '~/core/state'; @@ -21,7 +22,7 @@ const useMockNativeAsset = ({ chainId: ChainId; }): ParsedUserAsset | undefined | null => { const nativeAssets = useNativeAssets(); - const { chains } = useNetwork(); + const { chains } = useConfig(); const chain = chains.find((c) => c.id === chainId); if (!nativeAssets || !chain) return null; const nativeAssetMetadataChainId = getNetworkNativeAssetChainId({ chainId }); @@ -46,10 +47,11 @@ export const useNativeAsset = ({ }): { nativeAsset?: ParsedUserAsset | null } => { const { currentAddress } = useCurrentAddressStore(); const { currentCurrency } = useCurrentCurrencyStore(); - const { chains } = useNetwork(); + const { chains } = useConfig(); const nativeAssetUniqueId = getNetworkNativeAssetUniqueId({ chainId: chainId || ChainId.mainnet, }); + console.log('-- nativeAssetUniqueId', nativeAssetUniqueId); const { data: userNativeAsset } = useUserAsset( nativeAssetUniqueId || '', address || currentAddress, @@ -70,6 +72,12 @@ export const useNativeAsset = ({ const chain = chains.find((chain) => chain.id === chainId); const isChainIdCustomNetwork = isCustomChain(chainId); + console.log( + '-- isChainIdCustomNetwork', + isChainIdCustomNetwork, + customNetworkNativeAsset, + ); + console.log('-- chain?.testnet', chain, testnetNativeAsset); let nativeAsset: ParsedUserAsset | undefined | null; if (isChainIdCustomNetwork) { diff --git a/src/entries/popup/hooks/useNativeAssetForNetwork.ts b/src/entries/popup/hooks/useNativeAssetForNetwork.ts index 4cb8d72a06..ac7f229526 100644 --- a/src/entries/popup/hooks/useNativeAssetForNetwork.ts +++ b/src/entries/popup/hooks/useNativeAssetForNetwork.ts @@ -1,5 +1,5 @@ import { AddressZero } from '@ethersproject/constants'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AVAX_AVALANCHE_ADDRESS, diff --git a/src/entries/popup/hooks/useNativeAssets.ts b/src/entries/popup/hooks/useNativeAssets.ts index a79e694690..97a9b80ea8 100644 --- a/src/entries/popup/hooks/useNativeAssets.ts +++ b/src/entries/popup/hooks/useNativeAssets.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AVAX_AVALANCHE_ADDRESS, diff --git a/src/entries/popup/hooks/useRainbowChains.ts b/src/entries/popup/hooks/useRainbowChains.ts index a8278e5b9a..46bc966849 100644 --- a/src/entries/popup/hooks/useRainbowChains.ts +++ b/src/entries/popup/hooks/useRainbowChains.ts @@ -3,7 +3,7 @@ import { useMemo } from 'react'; import { useRainbowChainsStore } from '~/core/state'; export const useRainbowChains = () => { - const { rainbowChains } = useRainbowChainsStore(); + const rainbowChains = useRainbowChainsStore.use.rainbowChains(); const chains = useMemo( () => Object.values(rainbowChains) diff --git a/src/entries/popup/hooks/useTokensShortcuts.ts b/src/entries/popup/hooks/useTokensShortcuts.ts index 82d1abba16..5c75081190 100644 --- a/src/entries/popup/hooks/useTokensShortcuts.ts +++ b/src/entries/popup/hooks/useTokensShortcuts.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo } from 'react'; import { useLocation } from 'react-router'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import config from '~/core/firebase/remoteConfig'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/hooks/useTransactionListForPendingTxs.ts b/src/entries/popup/hooks/useTransactionListForPendingTxs.ts index 89636e4158..1dc45c565c 100644 --- a/src/entries/popup/hooks/useTransactionListForPendingTxs.ts +++ b/src/entries/popup/hooks/useTransactionListForPendingTxs.ts @@ -1,5 +1,5 @@ import { useEffect } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useConsolidatedTransactions } from '~/core/resources/transactions/consolidatedTransactions'; import { diff --git a/src/entries/popup/hooks/useUserAsset.ts b/src/entries/popup/hooks/useUserAsset.ts index 78e3dfb4a0..aa573f6014 100644 --- a/src/entries/popup/hooks/useUserAsset.ts +++ b/src/entries/popup/hooks/useUserAsset.ts @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { selectUserAssetWithUniqueId } from '~/core/resources/_selectors/assets'; import { useUserAssets } from '~/core/resources/assets'; diff --git a/src/entries/popup/hooks/useUserAssetsBalance.ts b/src/entries/popup/hooks/useUserAssetsBalance.ts index 79f0d503c8..3c50e3f81a 100644 --- a/src/entries/popup/hooks/useUserAssetsBalance.ts +++ b/src/entries/popup/hooks/useUserAssetsBalance.ts @@ -1,5 +1,5 @@ import { useCallback } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { selectUserAssetsBalance, @@ -26,7 +26,10 @@ export function useUserAssetsBalance() { [address, hidden], ); - const { data: totalAssetsBalanceKnownNetworks } = useUserAssets( + const { + data: totalAssetsBalanceKnownNetworks, + isLoading: knownNetworksIsLoading, + } = useUserAssets( { address, currency, @@ -42,22 +45,24 @@ export function useUserAssetsBalance() { }, ); - const { data: totalAssetsBalanceCustomNetworks = [] } = - useCustomNetworkAssets( - { - address: address as Address, - currency, - }, - { - select: (data) => - selectorFilterByUserChains({ - data, - selector: (assetsByChain) => { - return selectUserAssetsBalance(assetsByChain, isHidden); - }, - }), - }, - ); + const { + data: totalAssetsBalanceCustomNetworks = [], + isLoading: customNetworksIsLoading, + } = useCustomNetworkAssets( + { + address: address as Address, + currency, + }, + { + select: (data) => + selectorFilterByUserChains({ + data, + selector: (assetsByChain) => { + return selectUserAssetsBalance(assetsByChain, isHidden); + }, + }), + }, + ); const totalAssetsBalance = add( totalAssetsBalanceKnownNetworks as string, @@ -67,5 +72,6 @@ export function useUserAssetsBalance() { return { amount: totalAssetsBalance, display: convertAmountToNativeDisplay(totalAssetsBalance || 0, currency), + isLoading: knownNetworksIsLoading || customNetworksIsLoading, }; } diff --git a/src/entries/popup/hooks/useVirtualizedAssets.ts b/src/entries/popup/hooks/useVirtualizedAssets.ts index 14b16d3919..91a61243e2 100644 --- a/src/entries/popup/hooks/useVirtualizedAssets.ts +++ b/src/entries/popup/hooks/useVirtualizedAssets.ts @@ -24,7 +24,7 @@ export const useVirtualizedAssets = ({ const assetsRowVirtualizer = useVirtualizer({ count: assets?.length || 0, getScrollElement: () => containerRef.current, - estimateSize: () => size || 52, + estimateSize: () => (size ? size : 52), overscan: 20, }); return { diff --git a/src/entries/popup/hooks/useWalletInfo.ts b/src/entries/popup/hooks/useWalletInfo.ts index b319665ca7..f6b7163a46 100644 --- a/src/entries/popup/hooks/useWalletInfo.ts +++ b/src/entries/popup/hooks/useWalletInfo.ts @@ -1,4 +1,5 @@ -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { useContactsStore } from '~/core/state/contacts'; import { useWalletNamesStore } from '~/core/state/walletNames'; diff --git a/src/entries/popup/hooks/useWalletName.ts b/src/entries/popup/hooks/useWalletName.ts index b8214cccf5..797d262498 100644 --- a/src/entries/popup/hooks/useWalletName.ts +++ b/src/entries/popup/hooks/useWalletName.ts @@ -1,4 +1,5 @@ -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { useWalletNamesStore } from '~/core/state/walletNames'; import { truncateAddress } from '~/core/utils/address'; diff --git a/src/entries/popup/hooks/useWallets.ts b/src/entries/popup/hooks/useWallets.ts index c5e1e962a2..1fb05cdf89 100644 --- a/src/entries/popup/hooks/useWallets.ts +++ b/src/entries/popup/hooks/useWallets.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; import { useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useCurrentAddressStore } from '~/core/state'; import { useHiddenWalletsStore } from '~/core/state/hiddenWallets'; @@ -32,7 +32,9 @@ const fetchWallets = async () => { export const useWallets = () => { const { hiddenWallets } = useHiddenWalletsStore(); - const { data: allWallets, refetch } = useQuery(['accounts'], fetchWallets, { + const { data: allWallets, refetch } = useQuery({ + queryKey: ['accounts'], + queryFn: fetchWallets, refetchOnWindowFocus: false, refetchOnReconnect: false, }); diff --git a/src/entries/popup/hooks/useWalletsSummary.ts b/src/entries/popup/hooks/useWalletsSummary.ts index 4ed2e082fc..a9662967d7 100644 --- a/src/entries/popup/hooks/useWalletsSummary.ts +++ b/src/entries/popup/hooks/useWalletsSummary.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { AVAX_AVALANCHE_ADDRESS, diff --git a/src/entries/popup/hooks/useWatchPendingTransactions.ts b/src/entries/popup/hooks/useWatchPendingTransactions.ts index 15172b16bc..512fb2a434 100644 --- a/src/entries/popup/hooks/useWatchPendingTransactions.ts +++ b/src/entries/popup/hooks/useWatchPendingTransactions.ts @@ -1,6 +1,6 @@ -import { getProvider, mainnet } from '@wagmi/core'; import { useCallback, useMemo } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; +import { mainnet } from 'viem/chains'; import { queryClient } from '~/core/react-query'; import { userAssetsFetchQuery } from '~/core/resources/assets/userAssets'; @@ -23,6 +23,7 @@ import { getTransactionFlashbotStatus, getTransactionReceiptStatus, } from '~/core/utils/transactions'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { RainbowError, logger } from '~/logger'; import { useSwapRefreshAssets } from './swap/useSwapAssetsRefresh'; diff --git a/src/entries/popup/pages/_playgrounds/default.tsx b/src/entries/popup/pages/_playgrounds/default.tsx index 585b583885..3a2f0b7a01 100644 --- a/src/entries/popup/pages/_playgrounds/default.tsx +++ b/src/entries/popup/pages/_playgrounds/default.tsx @@ -1,11 +1,15 @@ import { useState } from 'react'; -import { useAccount, useBalance } from 'wagmi'; +import { useBalance } from 'wagmi'; import { selectUserAssetsList } from '~/core/resources/_selectors'; import { useUserAssets } from '~/core/resources/assets'; import { useFirstTransactionTimestamp } from '~/core/resources/transactions'; import { useTransactions } from '~/core/resources/transactions/transactions'; -import { useCurrentCurrencyStore, useCurrentLanguageStore } from '~/core/state'; +import { + useCurrentAddressStore, + useCurrentCurrencyStore, + useCurrentLanguageStore, +} from '~/core/state'; import { ChainId } from '~/core/types/chains'; import { RainbowTransaction } from '~/core/types/transactions'; import { Box, Inset, Stack, Text } from '~/design-system'; @@ -24,7 +28,7 @@ import { i18n } from '../../../../core/languages'; import { ClearStorage } from '../../components/_dev/ClearStorage'; export function Default() { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { currentCurrency, setCurrentCurrency } = useCurrentCurrencyStore(); const { currentLanguage } = useCurrentLanguageStore(); const [selectedNetwork, setSelectedNetwork] = useState('ethereum'); diff --git a/src/entries/popup/pages/home/Activity/ActivitiesList.tsx b/src/entries/popup/pages/home/Activity/ActivitiesList.tsx index 1d5bdebc38..f9a1520d73 100644 --- a/src/entries/popup/pages/home/Activity/ActivitiesList.tsx +++ b/src/entries/popup/pages/home/Activity/ActivitiesList.tsx @@ -1,6 +1,6 @@ import { motion } from 'framer-motion'; import { useCallback, useMemo, useRef } from 'react'; -import { Chain } from 'wagmi'; +import { Chain } from 'viem'; import { SUPPORTED_MAINNET_CHAINS } from '~/core/references'; import { useApprovals } from '~/core/resources/approvals/approvals'; @@ -128,12 +128,14 @@ export function Activities() { overflow: 'visible', }} paddingBottom="12px" + ref={containerRef} > {rows.map((virtualItem) => { @@ -145,8 +147,8 @@ export function Activities() { key={key} data-index={index} as={motion.div} - initial={{ opacity: isLabel ? 0 : 1, x: -4 }} - animate={{ opacity: 1, x: 0 }} + initial={{ opacity: isLabel ? 0 : 1 }} + animate={{ opacity: 1 }} transition={{ opacity: { duration: 0.3 } }} position="absolute" width="full" diff --git a/src/entries/popup/pages/home/Activity/ActivityDetails.tsx b/src/entries/popup/pages/home/Activity/ActivityDetails.tsx index 05ed8554c3..be4a69804f 100644 --- a/src/entries/popup/pages/home/Activity/ActivityDetails.tsx +++ b/src/entries/popup/pages/home/Activity/ActivityDetails.tsx @@ -15,10 +15,10 @@ import { TxHash, } from '~/core/types/transactions'; import { truncateAddress } from '~/core/utils/address'; -import { findRainbowChainForChainId } from '~/core/utils/chains'; import { copy } from '~/core/utils/copy'; import { formatDate } from '~/core/utils/formatDate'; import { formatCurrency, formatNumber } from '~/core/utils/formatNumber'; +import { findRainbowChainForChainId } from '~/core/utils/rainbowChains'; import { isLowerCaseMatch, truncateString } from '~/core/utils/strings'; import { getAdditionalDetails, diff --git a/src/entries/popup/pages/home/Approvals/Approvals.tsx b/src/entries/popup/pages/home/Approvals/Approvals.tsx index e86aa6a64a..c698430736 100644 --- a/src/entries/popup/pages/home/Approvals/Approvals.tsx +++ b/src/entries/popup/pages/home/Approvals/Approvals.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import { ReactNode, useCallback, useMemo, useRef, useState } from 'react'; -import { Address, Chain } from 'wagmi'; +import { Address, Chain } from 'viem'; import { i18n } from '~/core/languages'; import { SUPPORTED_MAINNET_CHAINS } from '~/core/references'; @@ -343,7 +343,7 @@ export const Approvals = () => { const revokeTransactions = useMemo( () => data?.pages - .map((p) => p.transactions) + ?.map((p) => p.transactions) .flat() .filter( (tx) => diff --git a/src/entries/popup/pages/home/Approvals/RevokeApprovalSheet.tsx b/src/entries/popup/pages/home/Approvals/RevokeApprovalSheet.tsx index 905b7d440b..bea53907dd 100644 --- a/src/entries/popup/pages/home/Approvals/RevokeApprovalSheet.tsx +++ b/src/entries/popup/pages/home/Approvals/RevokeApprovalSheet.tsx @@ -120,19 +120,22 @@ export const RevokeApprovalSheet = ({ }; }, [currentAddress, approval?.chain_id]); - const { data: revokeApproveTransaction } = useQuery( - ['populateRevokeApproval', assetAddress, spenderAddress, approvalChainId], - async () => + const { data: revokeApproveTransaction } = useQuery({ + queryKey: [ + 'populateRevokeApproval', + assetAddress, + spenderAddress, + approvalChainId, + ], + queryFn: async () => await populateRevokeApproval({ tokenAddress: assetAddress, spenderAddress: spenderAddress, chainId: approvalChainId, type: assetType, }), - { - enabled: !!approval && !!spender, - }, - ); + enabled: !!approval && !!spender, + }); const revokeApproveTransactionRequest: TransactionRequest | null = useMemo(() => { diff --git a/src/entries/popup/pages/home/ConnectedApps.tsx b/src/entries/popup/pages/home/ConnectedApps.tsx index 1bbb809043..d173b5dfe4 100644 --- a/src/entries/popup/pages/home/ConnectedApps.tsx +++ b/src/entries/popup/pages/home/ConnectedApps.tsx @@ -1,5 +1,6 @@ import { useCallback, useState } from 'react'; -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import appsConnectedImageMask from 'static/assets/appsConnectedImageMask.svg'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/pages/home/Header.tsx b/src/entries/popup/pages/home/Header.tsx index f20de5e0ea..941a6425bb 100644 --- a/src/entries/popup/pages/home/Header.tsx +++ b/src/entries/popup/pages/home/Header.tsx @@ -1,11 +1,11 @@ /* eslint-disable no-nested-ternary */ import { motion, useTransform } from 'framer-motion'; import * as React from 'react'; -import { useAccount } from 'wagmi'; import config from '~/core/firebase/remoteConfig'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; +import { useCurrentAddressStore } from '~/core/state'; import { useFeatureFlagsStore } from '~/core/state/currentSettings/featureFlags'; import { KeychainType } from '~/core/types/keychainTypes'; import { truncateAddress } from '~/core/utils/address'; @@ -46,7 +46,7 @@ export const Header = React.memo(function Header() { const y = useTransform(progress, [0, 1], [0, 2]); const avatarOpacityValue = useTransform(progress, [0, 0.25, 1], [0, 0, 1]); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); return ( @@ -116,7 +116,7 @@ export const Header = React.memo(function Header() { }); export function AvatarSection() { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: avatar } = useAvatar({ addressOrName: address }); return ( @@ -134,7 +134,7 @@ export function AvatarSection() { } function ActionButtonsSection() { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: avatar } = useAvatar({ addressOrName: address }); const { isWatchingWallet } = useWallets(); diff --git a/src/entries/popup/pages/home/MoreMenu.tsx b/src/entries/popup/pages/home/MoreMenu.tsx index 61da08aab8..c13c3028de 100644 --- a/src/entries/popup/pages/home/MoreMenu.tsx +++ b/src/entries/popup/pages/home/MoreMenu.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useAccount, useEnsName } from 'wagmi'; +import { useEnsName } from 'wagmi'; import { i18n } from '~/core/languages'; import { @@ -7,6 +7,7 @@ import { RAINBOW_SUPPORT_URL, } from '~/core/references/links'; import { shortcuts } from '~/core/references/shortcuts'; +import { useCurrentAddressStore } from '~/core/state'; import { useDeveloperToolsEnabledStore } from '~/core/state/currentSettings/developerToolsEnabled'; import { useTestnetModeStore } from '~/core/state/currentSettings/testnetMode'; import { getProfileUrl, goToNewTab } from '~/core/utils/tabs'; @@ -29,7 +30,7 @@ import { ROUTES } from '../../urls'; import playSound from '../../utils/playSound'; export const MoreMenu = ({ children }: { children: React.ReactNode }) => { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: ensName } = useEnsName({ address }); const navigate = useRainbowNavigate(); const { testnetMode, setTestnetMode } = useTestnetModeStore(); diff --git a/src/entries/popup/pages/home/NFTs/NFTCollectionSection.tsx b/src/entries/popup/pages/home/NFTs/NFTCollectionSection.tsx index 76c97d14cd..52750335f8 100644 --- a/src/entries/popup/pages/home/NFTs/NFTCollectionSection.tsx +++ b/src/entries/popup/pages/home/NFTs/NFTCollectionSection.tsx @@ -40,7 +40,7 @@ export function NFTCollectionSection({ onAssetClick, displayMode = 'grid', }: { - section: { assets: UniqueAsset[]; collection: UniqueAsset['collection'] }; + section?: { assets: UniqueAsset[]; collection: UniqueAsset['collection'] }; isLast: boolean; onAssetClick: (asset: UniqueAsset) => void; displayMode?: NFTCollectionDisplayMode; @@ -58,6 +58,7 @@ export function NFTCollectionSection({ collectionId: collectionId || '', }); }, [address, collectionId, toggleGallerySectionOpen]); + if (!section) return null; return ( @@ -68,7 +69,7 @@ export function NFTCollectionSection({ paddingTop: 7, paddingBottom: isLast && !collectionVisible ? 19 : 7, }} - testId={`nfts-collection-section-${section.collection.name}`} + testId={`nfts-collection-section-${section?.collection.name}`} > @@ -82,7 +83,7 @@ export function NFTCollectionSection({ }} > - {section.collection.name} + {section?.collection.name} - {section.assets.length} + {section?.assets.length} diff --git a/src/entries/popup/pages/home/NFTs/NFTDetails.tsx b/src/entries/popup/pages/home/NFTs/NFTDetails.tsx index 6b2617201a..5333fbb84e 100644 --- a/src/entries/popup/pages/home/NFTs/NFTDetails.tsx +++ b/src/entries/popup/pages/home/NFTs/NFTDetails.tsx @@ -3,7 +3,8 @@ import clsx from 'clsx'; import { format, formatDistanceStrict } from 'date-fns'; import { ReactNode, useCallback, useMemo } from 'react'; import { useParams } from 'react-router-dom'; -import { Address, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { i18n } from '~/core/languages'; import { selectNftCollections } from '~/core/resources/_selectors/nfts'; @@ -95,11 +96,17 @@ export default function NFTDetails() { }>(); const { testnetMode } = useTestnetModeStore(); const { chains: userChains } = useUserChains(); - const { data } = useNfts({ address, testnetMode, userChains }); + + const userChainIds = userChains.map(({ id }) => id); + + const { data: collections = {} } = useNfts( + { address, testnetMode, userChainIds }, + { select: (data) => selectNftCollections(data) }, + ); const navigate = useRainbowNavigate(); const { isWatchingWallet } = useWallets(); const setSelectedNft = useSelectedNftStore.use.setSelectedNft(); - const collections = selectNftCollections(data); + const nft = useMemo(() => { if (!collectionId || !nftId) return null; return collections?.[collectionId]?.assets?.find( diff --git a/src/entries/popup/pages/home/NFTs/NFTs.tsx b/src/entries/popup/pages/home/NFTs/NFTs.tsx index ac1573285b..c69cf7f12c 100644 --- a/src/entries/popup/pages/home/NFTs/NFTs.tsx +++ b/src/entries/popup/pages/home/NFTs/NFTs.tsx @@ -56,17 +56,23 @@ export function NFTs() { ); const { testnetMode } = useTestnetModeStore(); const { chains: userChains } = useUserChains(); + + const userChainIds = userChains.map(({ id }) => id); + const [manuallyRefetching, setManuallyRefetching] = useState(false); const { - data, + data: sortedSections = [], fetchNextPage, hasNextPage, isFetching, isFetchingNextPage, isLoading, refetch, - } = useNfts({ address, testnetMode, userChains }); - const sortedSections = selectSortedNftCollections(sort, data); + } = useNfts( + { address, testnetMode, userChainIds }, + { select: (data) => selectSortedNftCollections(sort, data) }, + ); + const navigate = useRainbowNavigate(); const containerRef = useContainerRef(); const { selectedNft } = useSelectedNftStore(); @@ -94,37 +100,38 @@ export function NFTs() { .concat( hiddenAssets.length ? { - assets: hiddenAssets, - collection: { - collection_id: '_hidden', - description: null, - discord_url: null, - total_quantity: null, - distinct_nft_count: null, - distinct_owner_count: null, - external_url: null, - featured_image_url: null, - hidden: null, - image_url: null, - name: i18n.t('nfts.hidden_section_title'), - short_description: null, - slug: '', - twitter_username: null, - wiki_link: null, - }, - } + assets: hiddenAssets, + collection: { + collection_id: '_hidden', + description: null, + discord_url: null, + total_quantity: null, + distinct_nft_count: null, + distinct_owner_count: null, + external_url: null, + featured_image_url: null, + hidden: null, + image_url: null, + name: i18n.t('nfts.hidden_section_title'), + short_description: null, + slug: '', + twitter_username: null, + wiki_link: null, + }, + } : [], ); + const estimateCollectionGalleryRowSize = useCallback( (sectionIndex: number) => { const COLLECTION_HEADER_HEIGHT = 30; const PADDING = 29; - const collection = allSections[sectionIndex]; + const collection = allSections?.[sectionIndex]; const sectionIsOpen = (sectionsState[address] || {})[ collection?.collection?.collection_id || '' ]; - if (sectionIsOpen) { + if (sectionIsOpen && collection) { const displayedAssets = collection.assets.filter((asset) => { return ( collection.collection.collection_id === '_hidden' || @@ -139,7 +146,9 @@ export function NFTs() { return PADDING + COLLECTION_HEADER_HEIGHT + thumbnailHeight; } else { const finalCellPadding = - !sectionIsOpen && sectionIndex === allSections?.length - 1 ? 12 : 0; + !sectionIsOpen && sectionIndex === (allSections?.length || 0) - 1 + ? 12 + : 0; return COLLECTION_HEADER_HEIGHT + finalCellPadding; } }, @@ -151,7 +160,7 @@ export function NFTs() { estimateSize: estimateCollectionGalleryRowSize, overscan: 12, }); - const groupedAssetRowData = chunkArray(groupedAssets, 3); + const groupedAssetRowData = chunkArray(groupedAssets || [], 3); const groupedGalleryRowVirtualizer = useVirtualizer({ count: groupedAssetRowData?.length, getScrollElement: () => containerRef.current, @@ -187,7 +196,7 @@ export function NFTs() { const nftCount = getNftCount({ address, testnetMode, - userChains, + userChainIds, }); const isPaginating = hasNextPage && nftCount < NFTS_LIMIT; @@ -202,7 +211,6 @@ export function NFTs() { } }, [ address, - data?.pages?.length, fetchNextPage, hasNextPage, isFetching, @@ -229,6 +237,7 @@ export function NFTs() { flexDirection="column" width="full" paddingHorizontal="12px" + ref={containerRef} > {displayMode === 'grouped' && ( <> @@ -242,7 +251,7 @@ export function NFTs() { @@ -330,7 +339,7 @@ export function NFTs() { { const { key, size, start, index } = virtualItem; - const section = allSections[index]; - const isLast = index === allSections.length - 1; + const section = allSections?.[index]; + const isLast = index === (allSections?.length || 0) - 1; return ( { data: validSignatureResponse, error, mutate: validateSignature, - isLoading: validatingSignature, + isPending: validatingSignature, isSuccess: accessGranted, } = useMutation< ValidatePointsSignatureMutation['onboardPoints'], @@ -370,7 +370,7 @@ export const PointsOnboardingSheet = () => { const userOnboarding = validSignatureResponse?.user.onboarding; - const { mutate: signChallenge, isLoading: isWaitingForSignature } = + const { mutate: signChallenge, isPending: isWaitingForSignature } = useMutation({ mutationFn: async () => { if (!data) return; diff --git a/src/entries/popup/pages/home/Points/usePoints.ts b/src/entries/popup/pages/home/Points/usePoints.ts index 65226e51ce..8425a00a67 100644 --- a/src/entries/popup/pages/home/Points/usePoints.ts +++ b/src/entries/popup/pages/home/Points/usePoints.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; import { useEffect } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { metadataClient } from '~/core/graphql'; import { @@ -23,7 +23,10 @@ export const seedPointsQueryCache = async ( }; export const fetchPointsQuery = async (address: Address) => - queryClient.fetchQuery(['points', address], () => fetchPoints(address)); + queryClient.fetchQuery({ + queryKey: ['points', address], + queryFn: () => fetchPoints(address), + }); let nextDropTimeout: NodeJS.Timeout | undefined; export const usePoints = (address: Address) => { diff --git a/src/entries/popup/pages/home/Points/usePointsChallenge.tsx b/src/entries/popup/pages/home/Points/usePointsChallenge.tsx index b84d68319d..ad92fbcd09 100644 --- a/src/entries/popup/pages/home/Points/usePointsChallenge.tsx +++ b/src/entries/popup/pages/home/Points/usePointsChallenge.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { metadataClient } from '~/core/graphql'; import { createQueryKey } from '~/core/react-query'; diff --git a/src/entries/popup/pages/home/Points/useReferralCodeValidation.tsx b/src/entries/popup/pages/home/Points/useReferralCodeValidation.tsx index 3feacd4747..e03b7c315a 100644 --- a/src/entries/popup/pages/home/Points/useReferralCodeValidation.tsx +++ b/src/entries/popup/pages/home/Points/useReferralCodeValidation.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { metadataClient } from '~/core/graphql'; import { createQueryKey } from '~/core/react-query'; diff --git a/src/entries/popup/pages/home/TabHeader.tsx b/src/entries/popup/pages/home/TabHeader.tsx index 988557f544..7d3b328980 100644 --- a/src/entries/popup/pages/home/TabHeader.tsx +++ b/src/entries/popup/pages/home/TabHeader.tsx @@ -1,5 +1,4 @@ import { useMemo } from 'react'; -import { useBalance } from 'wagmi'; import { i18n } from '~/core/languages'; import { supportedCurrencies } from '~/core/references'; @@ -28,16 +27,17 @@ export function TabHeader({ }) { const { currentAddress: address } = useCurrentAddressStore(); const { hideAssetBalances } = useHideAssetBalancesStore(); - const { data: balance, isLoading } = useBalance({ address }); - const { display: userAssetsBalanceDisplay } = useUserAssetsBalance(); + const { display: userAssetsBalanceDisplay, isLoading } = + useUserAssetsBalance(); const { currentCurrency } = useCurrentCurrencyStore(); const { visibleTokenCount } = useVisibleTokenCount(); const { testnetMode } = useTestnetModeStore(); const { chains: userChains } = useUserChains(); + const userChainIds = userChains.map(({ id }) => id); const nftCount = getNftCount({ address, testnetMode, - userChains, + userChainIds, }); const displayBalanceComponent = useMemo( @@ -63,7 +63,7 @@ export function TabHeader({ userSelect="all" cursor="text" > - {userAssetsBalanceDisplay} + {userAssetsBalanceDisplay || ''} ), [activeTab, currentCurrency, hideAssetBalances, userAssetsBalanceDisplay], @@ -108,7 +108,7 @@ export function TabHeader({ )} - {activeTab !== 'nfts' && balance && ( + {activeTab !== 'nfts' && ( previousData, staleTime: 1 * 60 * 1000, // 1min enabled: isDefaultSupportedChain({ chainId }), }); diff --git a/src/entries/popup/pages/home/TokenDetails/useTokenInfo.ts b/src/entries/popup/pages/home/TokenDetails/useTokenInfo.ts index 98146ee11f..22bdaed6b8 100644 --- a/src/entries/popup/pages/home/TokenDetails/useTokenInfo.ts +++ b/src/entries/popup/pages/home/TokenDetails/useTokenInfo.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { metadataClient } from '~/core/graphql'; import { AboutTokenQuery } from '~/core/graphql/__generated__/metadata'; diff --git a/src/entries/popup/pages/home/Tokens.tsx b/src/entries/popup/pages/home/Tokens.tsx index 7d72c1670f..f8c22bf658 100644 --- a/src/entries/popup/pages/home/Tokens.tsx +++ b/src/entries/popup/pages/home/Tokens.tsx @@ -1,9 +1,8 @@ -/* eslint-disable no-nested-ternary */ import { useVirtualizer } from '@tanstack/react-virtual'; import { motion } from 'framer-motion'; import uniqBy from 'lodash/uniqBy'; import { memo, useCallback, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { supportedCurrencies } from '~/core/references'; @@ -119,7 +118,8 @@ export function Tokens() { const { data: assets = [], - isInitialLoading, + isFetching, + isPending, refetch: refetchUserAssets, } = useUserAssets( { @@ -247,7 +247,7 @@ export function Tokens() { useTokensShortcuts(); - if (isInitialLoading || manuallyRefetchingTokens) { + if ((isFetching && isPending) || manuallyRefetchingTokens) { return ; } @@ -259,9 +259,9 @@ export function Tokens() { @@ -296,12 +296,14 @@ export function Tokens() { return ( {pinned && } @@ -352,6 +354,7 @@ export const AssetRow = memo(function AssetRow({ const nativeBalanceDisplay = useMemo( () => + // eslint-disable-next-line no-nested-ternary hideAssetBalances ? ( @@ -514,11 +517,10 @@ function TokensEmptyState({ depositAddress }: EmptyStateProps) { borderRadius="16px" padding="16px" style={{ - boxShadow: `0 0 0 1px ${ - currentTheme === 'dark' + boxShadow: `0 0 0 1px ${currentTheme === 'dark' ? 'rgba(245, 248, 255, 0.025)' : 'rgba(9, 17, 31, 0.03)' - } inset`, + } inset`, }} > @@ -574,11 +576,10 @@ function TokensEmptyState({ depositAddress }: EmptyStateProps) { borderRadius="16px" padding="16px" style={{ - boxShadow: `0 0 0 1px ${ - currentTheme === 'dark' + boxShadow: `0 0 0 1px ${currentTheme === 'dark' ? 'rgba(245, 248, 255, 0.025)' : 'rgba(9, 17, 31, 0.03)' - } inset`, + } inset`, }} > diff --git a/src/entries/popup/pages/hw/addByIndexSheet.tsx b/src/entries/popup/pages/hw/addByIndexSheet.tsx index 01a97e7f52..16c46af0d4 100644 --- a/src/entries/popup/pages/hw/addByIndexSheet.tsx +++ b/src/entries/popup/pages/hw/addByIndexSheet.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { getHDPathForVendorAndType } from '~/core/keychain/hdPath'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/pages/hw/success.tsx b/src/entries/popup/pages/hw/success.tsx index 6599a7f477..c51f6691a5 100644 --- a/src/entries/popup/pages/hw/success.tsx +++ b/src/entries/popup/pages/hw/success.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from 'react'; import { useLocation } from 'react-router-dom'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import hardhwareWalletAvatarImageMask from 'static/assets/hardhwareWalletAvatarImageMask.svg'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/pages/hw/walletList/index.tsx b/src/entries/popup/pages/hw/walletList/index.tsx index 7164ea231a..bc1291b9c9 100644 --- a/src/entries/popup/pages/hw/walletList/index.tsx +++ b/src/entries/popup/pages/hw/walletList/index.tsx @@ -1,6 +1,6 @@ -import { Address } from '@wagmi/core'; -import { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { useLocation } from 'react-router-dom'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; @@ -169,11 +169,11 @@ const WalletListHW = () => { > {selectedAccounts === 1 ? i18n.t( - 'edit_import_wallet_selection.importing_your_wallet.one', - ) + 'edit_import_wallet_selection.importing_your_wallet.one', + ) : i18n.t( - 'edit_import_wallet_selection.importing_your_wallet.other', - )} + 'edit_import_wallet_selection.importing_your_wallet.other', + )} { > {accountsToImport?.length > 1 ? i18n.t('hw.connect_wallets_found', { - count: accountsToImport?.length, - vendor: state.vendor, - }) + count: accountsToImport?.length, + vendor: state.vendor, + }) : i18n.t('hw.connect_wallets_not_found', { - vendor: state.vendor, - })} + vendor: state.vendor, + })} @@ -426,8 +426,8 @@ const WalletListHW = () => { > {selectedAccounts > 1 ? i18n.t('hw.connect_n_wallets', { - count: selectedAccounts, - }) + count: selectedAccounts, + }) : i18n.t('hw.connect_wallet')} diff --git a/src/entries/popup/pages/messages/AddEthereumChain/index.tsx b/src/entries/popup/pages/messages/AddEthereumChain/index.tsx index d8454b3837..4f49defd20 100644 --- a/src/entries/popup/pages/messages/AddEthereumChain/index.tsx +++ b/src/entries/popup/pages/messages/AddEthereumChain/index.tsx @@ -1,5 +1,5 @@ import { useCallback, useState } from 'react'; -import { Chain } from 'wagmi'; +import { Chain } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; @@ -62,7 +62,6 @@ export const AddEthereumChain = ({ const chain: Chain = { id: Number(chainId), name: chainName || name, - network: chainName || name, nativeCurrency: { symbol, decimals: 18, diff --git a/src/entries/popup/pages/messages/BottomActions/index.tsx b/src/entries/popup/pages/messages/BottomActions/index.tsx index 48406ef3ef..c9a7a04b3a 100644 --- a/src/entries/popup/pages/messages/BottomActions/index.tsx +++ b/src/entries/popup/pages/messages/BottomActions/index.tsx @@ -1,5 +1,6 @@ import React, { useCallback, useImperativeHandle, useRef } from 'react'; -import { Address, useBalance } from 'wagmi'; +import { Address } from 'viem'; +import { useBalance } from 'wagmi'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; diff --git a/src/entries/popup/pages/messages/RequestAccounts/RequestAccountsActions.tsx b/src/entries/popup/pages/messages/RequestAccounts/RequestAccountsActions.tsx index 8e6d9c436f..3ddf69f7e4 100644 --- a/src/entries/popup/pages/messages/RequestAccounts/RequestAccountsActions.tsx +++ b/src/entries/popup/pages/messages/RequestAccounts/RequestAccountsActions.tsx @@ -1,4 +1,4 @@ -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { DAppStatus } from '~/core/graphql/__generated__/metadata'; import { i18n } from '~/core/languages'; diff --git a/src/entries/popup/pages/messages/RequestAccounts/index.tsx b/src/entries/popup/pages/messages/RequestAccounts/index.tsx index 27e987d8f9..c78b6b359f 100644 --- a/src/entries/popup/pages/messages/RequestAccounts/index.tsx +++ b/src/entries/popup/pages/messages/RequestAccounts/index.tsx @@ -1,5 +1,5 @@ import { useCallback, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; diff --git a/src/entries/popup/pages/messages/SendTransaction/SendTransactionsInfo.tsx b/src/entries/popup/pages/messages/SendTransaction/SendTransactionsInfo.tsx index 6667d51cbb..58dc246d82 100644 --- a/src/entries/popup/pages/messages/SendTransaction/SendTransactionsInfo.tsx +++ b/src/entries/popup/pages/messages/SendTransaction/SendTransactionsInfo.tsx @@ -1,7 +1,7 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { AnimatePresence, motion } from 'framer-motion'; import { ReactNode, memo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { DAppStatus } from '~/core/graphql/__generated__/metadata'; import { i18n } from '~/core/languages'; @@ -109,7 +109,7 @@ const Overview = memo(function Overview({ }: { chainId: ChainId; simulation: TransactionSimulation | undefined; - status: 'loading' | 'error' | 'success'; + status: 'pending' | 'error' | 'success'; error: SimulationError | null; metadata: DappMetadata | null; }) { @@ -339,7 +339,7 @@ function TransactionInfo({ diff --git a/src/entries/popup/pages/messages/SendTransaction/index.tsx b/src/entries/popup/pages/messages/SendTransaction/index.tsx index 1856977cfb..7986a5627a 100644 --- a/src/entries/popup/pages/messages/SendTransaction/index.tsx +++ b/src/entries/popup/pages/messages/SendTransaction/index.tsx @@ -1,7 +1,7 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { getAddress } from '@ethersproject/address'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; @@ -89,7 +89,7 @@ export function SendTransaction({ ); const txData = { from: selectedWallet, - to: txRequest?.to ? getAddress(txRequest?.to) : undefined, + to: txRequest?.to ? (getAddress(txRequest?.to) as Address) : undefined, value: txRequest.value || '0x0', data: txRequest.data ?? '0x', chainId: activeChainId, diff --git a/src/entries/popup/pages/messages/SignMessage/SignMessageInfo.tsx b/src/entries/popup/pages/messages/SignMessage/SignMessageInfo.tsx index 72df849ffa..e33dea996c 100644 --- a/src/entries/popup/pages/messages/SignMessage/SignMessageInfo.tsx +++ b/src/entries/popup/pages/messages/SignMessage/SignMessageInfo.tsx @@ -37,7 +37,7 @@ function Overview({ message: string | undefined; typedData: boolean; simulation: TransactionSimulation | undefined; - status: 'loading' | 'error' | 'success'; + status: 'pending' | 'error' | 'success'; error: SimulationError | null; }) { return ( @@ -176,7 +176,7 @@ export const SignMessageInfo = ({ request }: SignMessageProps) => { message={message} typedData={!!typedData} simulation={simulation} - status={status === 'error' && isRefetching ? 'loading' : status} + status={status === 'error' && isRefetching ? 'pending' : status} error={error} /> - {status === 'loading' && ( + {status === 'pending' && ( diff --git a/src/entries/popup/pages/messages/WatchAsset/index.tsx b/src/entries/popup/pages/messages/WatchAsset/index.tsx index 063746da6c..e166719832 100644 --- a/src/entries/popup/pages/messages/WatchAsset/index.tsx +++ b/src/entries/popup/pages/messages/WatchAsset/index.tsx @@ -1,6 +1,5 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { Address } from 'wagmi'; -import { getProvider } from 'wagmi/actions'; +import { Address } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; @@ -17,6 +16,7 @@ import { getCustomChainIconUrl, } from '~/core/utils/assets'; import { getChain } from '~/core/utils/chains'; +import { getProvider } from '~/core/wagmi/clientToProvider'; import { Row, Rows, Separator } from '~/design-system'; import { RainbowError, logger } from '~/logger'; @@ -110,7 +110,6 @@ export const WatchAsset = ({ }, [asset, wrongNetwork]); const fetchAssetData = useCallback(async () => { - const provider = getProvider({ chainId: Number(selectedChainId) }); const assetWithMetadata = asset; // Get the balance onchain @@ -118,7 +117,7 @@ export const WatchAsset = ({ parsedAsset: assetWithMetadata, currentAddress, currency: currentCurrency, - provider, + provider: getProvider({ chainId: Number(selectedChainId) }), }); // Attempt to get the price through the backend diff --git a/src/entries/popup/pages/messages/useHasEnoughGas.ts b/src/entries/popup/pages/messages/useHasEnoughGas.ts index 4f7cb774ae..6e93d6cdde 100644 --- a/src/entries/popup/pages/messages/useHasEnoughGas.ts +++ b/src/entries/popup/pages/messages/useHasEnoughGas.ts @@ -15,6 +15,7 @@ export const useHasEnoughGas = (session: ActiveSession) => { }); const selectedGas = useGasStore.use.selectedGas(); + console.log('nativeAsset', chainId, nativeAsset); return lessThan( selectedGas?.gasFee?.amount || '0', toWei(nativeAsset?.balance?.amount || '0'), diff --git a/src/entries/popup/pages/messages/useSimulateTransaction.tsx b/src/entries/popup/pages/messages/useSimulateTransaction.tsx index 1cb39d8fb7..25e14b341d 100644 --- a/src/entries/popup/pages/messages/useSimulateTransaction.tsx +++ b/src/entries/popup/pages/messages/useSimulateTransaction.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { metadataPostClient } from '~/core/graphql'; import { Message, Transaction } from '~/core/graphql/__generated__/metadata'; diff --git a/src/entries/popup/pages/qrcode/index.tsx b/src/entries/popup/pages/qrcode/index.tsx index 6b57a55636..97bf85c3f9 100644 --- a/src/entries/popup/pages/qrcode/index.tsx +++ b/src/entries/popup/pages/qrcode/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { useAccount } from 'wagmi'; import { i18n } from '~/core/languages'; +import { useCurrentAddressStore } from '~/core/state'; import { truncateAddress } from '~/core/utils/address'; import { Box, Button, Stack, Text } from '~/design-system'; @@ -12,7 +12,7 @@ import { SwitchWalletShortcuts } from '../../hooks/useSwitchWalletShortcuts'; import { QRCode } from './qrcode'; export const QRCodePage = () => { - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const handleCopy = React.useCallback(() => { navigator.clipboard.writeText(address as string); diff --git a/src/entries/popup/pages/send/ContactPrompt.tsx b/src/entries/popup/pages/send/ContactPrompt.tsx index b9f5532ead..9da483974f 100644 --- a/src/entries/popup/pages/send/ContactPrompt.tsx +++ b/src/entries/popup/pages/send/ContactPrompt.tsx @@ -1,5 +1,5 @@ import React, { ChangeEvent, useCallback, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useENSAvatar } from '~/core/resources/metadata/ensAvatar'; diff --git a/src/entries/popup/pages/send/NavbarContactButton.tsx b/src/entries/popup/pages/send/NavbarContactButton.tsx index e3e3f97834..e7523b6451 100644 --- a/src/entries/popup/pages/send/NavbarContactButton.tsx +++ b/src/entries/popup/pages/send/NavbarContactButton.tsx @@ -1,6 +1,6 @@ import { AnimatePresence, motion } from 'framer-motion'; import React, { useCallback, useRef } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; diff --git a/src/entries/popup/pages/send/ReviewSheet.tsx b/src/entries/popup/pages/send/ReviewSheet.tsx index 08b3673449..43ff9087de 100644 --- a/src/entries/popup/pages/send/ReviewSheet.tsx +++ b/src/entries/popup/pages/send/ReviewSheet.tsx @@ -1,4 +1,3 @@ -import { getNetwork } from '@wagmi/core'; import { motion } from 'framer-motion'; import React, { useCallback, @@ -7,7 +6,7 @@ import React, { useRef, useState, } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { ParsedUserAsset } from '~/core/types/assets'; @@ -22,6 +21,7 @@ import { } from '~/core/utils/chains'; import { isLowerCaseMatch } from '~/core/utils/strings'; import { getExplorerUrl, goToNewTab } from '~/core/utils/tabs'; +import { wagmiConfig } from '~/core/wagmi'; import { Bleed, Box, @@ -277,7 +277,7 @@ export const ReviewSheet = ({ const prevShow = usePrevious(show); const [sending, setSending] = useState(false); const confirmSendButtonRef = useRef(null); - const { chains } = getNetwork(); + const { chains } = wagmiConfig; const assetChainId = asset?.chainId || chainIdFromChainName(nft?.network || ChainName.mainnet); const chain = useMemo( diff --git a/src/entries/popup/pages/send/ToAddressInput.tsx b/src/entries/popup/pages/send/ToAddressInput.tsx index 10f9a9de21..b00c7c2914 100644 --- a/src/entries/popup/pages/send/ToAddressInput.tsx +++ b/src/entries/popup/pages/send/ToAddressInput.tsx @@ -9,7 +9,7 @@ import React, { useRef, useState, } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/pages/send/index.tsx b/src/entries/popup/pages/send/index.tsx index 21630fe699..437eeba19f 100644 --- a/src/entries/popup/pages/send/index.tsx +++ b/src/entries/popup/pages/send/index.tsx @@ -12,8 +12,7 @@ import { useState, } from 'react'; import { useSearchParams } from 'react-router-dom'; -import { isAddress } from 'viem'; -import { Address } from 'wagmi'; +import { Address, isAddress } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; @@ -322,7 +321,7 @@ export function Send() { from: fromAddress, to: txToAddress, hash: result.hash as TxHash, - chainId, + chainId: activeChainId, status: 'pending', type: 'send', nonce: result.nonce, @@ -337,10 +336,10 @@ export function Send() { } as NewTransaction; }, [ + activeChainId, asset, assetAmount, buildNftAssetObject, - chainId, flashbotsEnabledGlobally, fromAddress, nft, @@ -372,7 +371,7 @@ export function Send() { const transaction: NewTransaction = buildPendingTransaction(result); addNewTransaction({ address: fromAddress, - chainId, + chainId: activeChainId, transaction, }); callback?.(); @@ -404,7 +403,7 @@ export function Send() { const transaction: NewTransaction = buildPendingTransaction(result); addNewTransaction({ address: fromAddress, - chainId, + chainId: activeChainId, transaction, }); callback?.(); diff --git a/src/entries/popup/pages/settings/customChain/addAsset.tsx b/src/entries/popup/pages/settings/customChain/addAsset.tsx index 76fe353fee..eed23bda8b 100644 --- a/src/entries/popup/pages/settings/customChain/addAsset.tsx +++ b/src/entries/popup/pages/settings/customChain/addAsset.tsx @@ -2,7 +2,7 @@ import { isValidAddress } from '@ethereumjs/util'; import { isEqual } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation } from 'react-router'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { useAssetMetadata } from '~/core/resources/assets/assetMetadata'; import { usePopupInstanceStore } from '~/core/state/popupInstances'; diff --git a/src/entries/popup/pages/settings/customChain/index.tsx b/src/entries/popup/pages/settings/customChain/index.tsx index fe48728cc4..572cef6090 100644 --- a/src/entries/popup/pages/settings/customChain/index.tsx +++ b/src/entries/popup/pages/settings/customChain/index.tsx @@ -1,7 +1,7 @@ import { isEqual } from 'lodash'; import { useCallback, useEffect, useRef, useState } from 'react'; import { useLocation } from 'react-router'; -import { Chain } from 'wagmi'; +import { Chain } from 'viem'; import { i18n } from '~/core/languages'; import { useChainMetadata } from '~/core/resources/chains/chainMetadata'; @@ -647,7 +647,6 @@ export function SettingsCustomChain() { const chain: Chain = { id: chainId, name, - network: name, nativeCurrency: { symbol, decimals: 18, diff --git a/src/entries/popup/pages/settings/networks.tsx b/src/entries/popup/pages/settings/networks.tsx index 51dfc45842..0ca89108b5 100644 --- a/src/entries/popup/pages/settings/networks.tsx +++ b/src/entries/popup/pages/settings/networks.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo } from 'react'; import { DropResult } from 'react-beautiful-dnd'; -import { Chain } from 'wagmi'; +import { Chain } from 'viem'; import { i18n } from '~/core/languages'; import { SUPPORTED_CHAINS, SUPPORTED_CHAIN_IDS } from '~/core/references'; diff --git a/src/entries/popup/pages/settings/rpcs.tsx b/src/entries/popup/pages/settings/rpcs.tsx index de765bca1b..4dacabe7a1 100644 --- a/src/entries/popup/pages/settings/rpcs.tsx +++ b/src/entries/popup/pages/settings/rpcs.tsx @@ -1,7 +1,7 @@ import chroma from 'chroma-js'; import { useCallback, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; -import { Address, Chain } from 'wagmi'; +import { Address, Chain } from 'viem'; import { i18n } from '~/core/languages'; import { @@ -99,6 +99,8 @@ export function SettingsNetworksRPCs() { const { rainbowChains, setActiveRPC, removeCustomRPC } = useRainbowChainsStore(); + console.log('-- rainbowChains', rainbowChains); + const rainbowChain = rainbowChains[Number(chainId)]; const activeCustomRPC = rainbowChain?.chains.find( diff --git a/src/entries/popup/pages/settings/walletsAndKeys/hardwareWalletWipePrompt.tsx b/src/entries/popup/pages/settings/walletsAndKeys/hardwareWalletWipePrompt.tsx index 40eaa765d3..a42c809fbb 100644 --- a/src/entries/popup/pages/settings/walletsAndKeys/hardwareWalletWipePrompt.tsx +++ b/src/entries/popup/pages/settings/walletsAndKeys/hardwareWalletWipePrompt.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { appSessionsStore, useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/pages/settings/walletsAndKeys/walletDetails.tsx b/src/entries/popup/pages/settings/walletsAndKeys/walletDetails.tsx index c10dee05d5..826b7c4bf6 100644 --- a/src/entries/popup/pages/settings/walletsAndKeys/walletDetails.tsx +++ b/src/entries/popup/pages/settings/walletsAndKeys/walletDetails.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation } from 'react-router-dom'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/pages/settings/walletsAndKeys/walletGroupWipePrompt.tsx b/src/entries/popup/pages/settings/walletsAndKeys/walletGroupWipePrompt.tsx index fe4791e573..c6959d32cb 100644 --- a/src/entries/popup/pages/settings/walletsAndKeys/walletGroupWipePrompt.tsx +++ b/src/entries/popup/pages/settings/walletsAndKeys/walletGroupWipePrompt.tsx @@ -1,5 +1,5 @@ import { useCallback } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { appSessionsStore, useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/pages/settings/walletsAndKeys/walletsAndKeys.tsx b/src/entries/popup/pages/settings/walletsAndKeys/walletsAndKeys.tsx index f3fbf2889f..c841470138 100644 --- a/src/entries/popup/pages/settings/walletsAndKeys/walletsAndKeys.tsx +++ b/src/entries/popup/pages/settings/walletsAndKeys/walletsAndKeys.tsx @@ -7,7 +7,7 @@ import { useState, } from 'react'; import { useLocation } from 'react-router'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useHiddenWalletsStore } from '~/core/state/hiddenWallets'; diff --git a/src/entries/popup/pages/sign/index.tsx b/src/entries/popup/pages/sign/index.tsx index 1ace5dea44..a428605557 100644 --- a/src/entries/popup/pages/sign/index.tsx +++ b/src/entries/popup/pages/sign/index.tsx @@ -8,8 +8,8 @@ import { recoverTypedSignature, } from '@metamask/eth-sig-util'; import React, { useCallback, useState } from 'react'; -import { useAccount } from 'wagmi'; +import { useCurrentAddressStore } from '~/core/state'; import { WalletAction } from '~/core/types/walletActions'; import { Box, Column, Columns, Row, Rows, Text } from '~/design-system'; @@ -19,7 +19,7 @@ export function Sign() { const [message, setMessage] = useState(''); const [signature, setSignature] = useState(''); const [signing, setSigning] = useState(false); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const handleMessageChange = useCallback( (event: { target: { value: React.SetStateAction } }) => { diff --git a/src/entries/popup/pages/speedUpAndCancelSheet/index.tsx b/src/entries/popup/pages/speedUpAndCancelSheet/index.tsx index ba68dd66e8..d2a27348ae 100644 --- a/src/entries/popup/pages/speedUpAndCancelSheet/index.tsx +++ b/src/entries/popup/pages/speedUpAndCancelSheet/index.tsx @@ -1,10 +1,11 @@ import { TransactionRequest } from '@ethersproject/abstract-provider'; import { useMutation } from '@tanstack/react-query'; import BigNumber from 'bignumber.js'; -import { Address, useAccount, useBalance, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useBalance, useEnsName } from 'wagmi'; import { i18n } from '~/core/languages'; -import { useGasStore } from '~/core/state'; +import { useCurrentAddressStore, useGasStore } from '~/core/state'; import { GasSpeed, TransactionGasParams, @@ -167,7 +168,7 @@ export function SpeedUpAndCancelSheet({ selectedGasParams, ); - const { mutate: executeTransaction, isLoading: sending } = useMutation({ + const { mutate: executeTransaction, isPending: sending } = useMutation({ mutationFn: async () => { const replaceTx = await sendTransaction(transactionRequest); @@ -207,7 +208,7 @@ export function SpeedUpAndCancelSheet({ }, }); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); return ( diff --git a/src/entries/popup/pages/swap/SwapReviewSheet/SwapReviewSheet.tsx b/src/entries/popup/pages/swap/SwapReviewSheet/SwapReviewSheet.tsx index 6199decd77..384d3b7841 100644 --- a/src/entries/popup/pages/swap/SwapReviewSheet/SwapReviewSheet.tsx +++ b/src/entries/popup/pages/swap/SwapReviewSheet/SwapReviewSheet.tsx @@ -7,7 +7,7 @@ import React, { useRef, useState, } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { analytics } from '~/analytics'; import { event } from '~/analytics/event'; diff --git a/src/entries/popup/pages/swap/SwapReviewSheet/SwapViewContractDropdown.tsx b/src/entries/popup/pages/swap/SwapReviewSheet/SwapViewContractDropdown.tsx index fba43dd929..1e23ddc3c3 100644 --- a/src/entries/popup/pages/swap/SwapReviewSheet/SwapViewContractDropdown.tsx +++ b/src/entries/popup/pages/swap/SwapReviewSheet/SwapViewContractDropdown.tsx @@ -1,5 +1,5 @@ import React, { ReactNode, useCallback } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { ChainId } from '~/core/types/chains'; diff --git a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuyDropdown.tsx b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuyDropdown.tsx index 1c2b567c84..9540e00f9c 100644 --- a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuyDropdown.tsx +++ b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuyDropdown.tsx @@ -5,7 +5,7 @@ import { i18n } from '~/core/languages'; import { ParsedSearchAsset } from '~/core/types/assets'; import { ChainId } from '~/core/types/chains'; import { isL2Chain } from '~/core/utils/chains'; -import { Box, Inline, Stack, Symbol, Text } from '~/design-system'; +import { Box, Inline, Row, Rows, Stack, Symbol, Text } from '~/design-system'; import { ButtonOverflow } from '~/design-system/components/Button/ButtonOverflow'; import { SwitchNetworkMenu } from '~/entries/popup/components/SwitchMenu/SwitchNetworkMenu'; import { AssetToBuySection } from '~/entries/popup/hooks/useSearchCurrencyLists'; @@ -92,17 +92,19 @@ export const TokenToBuyDropdown = ({ initial="hidden" animate="show" > - - {assets?.map((assetSection) => ( - + + {assets?.map((assetSection, i) => ( + + + ))} - + {!assetsCount && ( diff --git a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuySection.tsx b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuySection.tsx index 527e067241..56d9414461 100644 --- a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuySection.tsx +++ b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToBuySection.tsx @@ -118,7 +118,7 @@ export const TokenToBuySection = ({ const t = useTranslationContext(); const { containerRef, assetsRowVirtualizer } = useVirtualizedAssets({ assets: assetSection.data, - size: 5, + size: 52, }); const { background, gradient, symbol, title, webkitBackgroundClip } = @@ -132,8 +132,20 @@ export const TokenToBuySection = ({ }, [assetSection.id, outputChainId]); if (!assetSection.data.length) return null; + + const height = + assetsRowVirtualizer.getTotalSize() + + 14 + + (assetSection.id === 'other_networks' ? 52 : 0); + return ( - + {assetSection.id === 'other_networks' ? ( @@ -174,7 +186,13 @@ export const TokenToBuySection = ({ - + {assetsRowVirtualizer?.getVirtualItems().map((virtualItem, i) => { const { index } = virtualItem; const asset = assetSection.data?.[index] as SearchAsset; diff --git a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToSellDropdown.tsx b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToSellDropdown.tsx index 78226dd799..2953facc89 100644 --- a/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToSellDropdown.tsx +++ b/src/entries/popup/pages/swap/SwapTokenInput/TokenDropdown/TokenToSellDropdown.tsx @@ -132,6 +132,9 @@ export const TokenToSellDropdown = ({ initial="hidden" animate="show" ref={containerRef} + style={{ + height: `${assetsRowVirtualizer.getTotalSize()}px`, + }} > {!!assets?.length && assetsRowVirtualizer?.getVirtualItems().map((virtualItem, i) => { diff --git a/src/entries/popup/pages/walletReady/index.tsx b/src/entries/popup/pages/walletReady/index.tsx index 32d17ace3b..ded4ab956f 100644 --- a/src/entries/popup/pages/walletReady/index.tsx +++ b/src/entries/popup/pages/walletReady/index.tsx @@ -10,9 +10,10 @@ import { ReadyShortcut } from './ReadyShortcut'; const userSettingsPlaceholder = {} as chrome.action.UserSettings; const useChromeUserSettings = () => { - const settings = useQuery(['chrome.action.getUserSettings'], () => - chrome.action.getUserSettings(), - ); + const settings = useQuery({ + queryKey: ['chrome.action.getUserSettings'], + queryFn: () => chrome.action.getUserSettings(), + }); return settings.data || userSettingsPlaceholder; }; diff --git a/src/entries/popup/pages/walletSwitcher/chooseWalletGroup.tsx b/src/entries/popup/pages/walletSwitcher/chooseWalletGroup.tsx index 62e0031e65..97de435464 100644 --- a/src/entries/popup/pages/walletSwitcher/chooseWalletGroup.tsx +++ b/src/entries/popup/pages/walletSwitcher/chooseWalletGroup.tsx @@ -1,6 +1,6 @@ import { ReactElement, useCallback, useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; diff --git a/src/entries/popup/pages/walletSwitcher/createWalletPrompt.tsx b/src/entries/popup/pages/walletSwitcher/createWalletPrompt.tsx index 47e717e96d..1fdc22426d 100644 --- a/src/entries/popup/pages/walletSwitcher/createWalletPrompt.tsx +++ b/src/entries/popup/pages/walletSwitcher/createWalletPrompt.tsx @@ -1,6 +1,6 @@ import { KeyboardEvent, useCallback, useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useCurrentAddressStore } from '~/core/state'; diff --git a/src/entries/popup/pages/walletSwitcher/index.tsx b/src/entries/popup/pages/walletSwitcher/index.tsx index c40ee03523..9f83f3e12f 100644 --- a/src/entries/popup/pages/walletSwitcher/index.tsx +++ b/src/entries/popup/pages/walletSwitcher/index.tsx @@ -1,7 +1,7 @@ import { motion } from 'framer-motion'; import React, { useCallback, useMemo, useRef, useState } from 'react'; import { DropResult } from 'react-beautiful-dnd'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { shortcuts } from '~/core/references/shortcuts'; diff --git a/src/entries/popup/pages/walletSwitcher/removeWalletPrompt.tsx b/src/entries/popup/pages/walletSwitcher/removeWalletPrompt.tsx index b7fe2ca309..23edda512b 100644 --- a/src/entries/popup/pages/walletSwitcher/removeWalletPrompt.tsx +++ b/src/entries/popup/pages/walletSwitcher/removeWalletPrompt.tsx @@ -1,5 +1,5 @@ import React, { useMemo, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { POPUP_URL, goToNewTab } from '~/core/utils/tabs'; diff --git a/src/entries/popup/pages/walletSwitcher/renameWalletPrompt.tsx b/src/entries/popup/pages/walletSwitcher/renameWalletPrompt.tsx index bc93ec1dc3..9cfedd5902 100644 --- a/src/entries/popup/pages/walletSwitcher/renameWalletPrompt.tsx +++ b/src/entries/popup/pages/walletSwitcher/renameWalletPrompt.tsx @@ -1,5 +1,5 @@ import { KeyboardEvent, useState } from 'react'; -import { Address } from 'wagmi'; +import { Address } from 'viem'; import { i18n } from '~/core/languages'; import { useWalletNamesStore } from '~/core/state/walletNames'; diff --git a/src/entries/popup/pages/wallets/index.tsx b/src/entries/popup/pages/wallets/index.tsx index 29ab935191..278a3f7d91 100644 --- a/src/entries/popup/pages/wallets/index.tsx +++ b/src/entries/popup/pages/wallets/index.tsx @@ -1,10 +1,12 @@ import { fetchEnsAddress } from '@wagmi/core'; import React, { Fragment, useCallback, useEffect, useState } from 'react'; -import { Address, useAccount, useEnsName } from 'wagmi'; +import { Address } from 'viem'; +import { useEnsName } from 'wagmi'; import { useCurrentAddressStore } from '~/core/state'; import { WalletAction } from '~/core/types/walletActions'; import { EthereumWalletSeed, isENSAddressFormat } from '~/core/utils/ethereum'; +import { wagmiConfig } from '~/core/wagmi'; import { Box, Separator, Text } from '~/design-system'; import * as wallet from '../../handlers/wallet'; @@ -267,7 +269,7 @@ export function Wallets() { const [password, setPassword] = useState(''); const [isUnlocked, setIsUnlocked] = useState(true); const [isNewUser, setIsNewUser] = useState(true); - const { address } = useAccount(); + const { currentAddress: address } = useCurrentAddressStore(); const { data: ensName } = useEnsName({ address }); const setCurrentAddress = useCurrentAddressStore.use.setCurrentAddress(); @@ -297,7 +299,9 @@ export function Wallets() { let seed = secret; if (isENSAddressFormat(secret)) { try { - seed = (await fetchEnsAddress({ name: secret })) as Address; + seed = (await fetchEnsAddress(wagmiConfig, { + name: secret, + })) as Address; } catch (e) { console.log('error', e); alert('Invalid ENS name'); diff --git a/src/entries/popup/wagmi/RainbowConnector.ts b/src/entries/popup/wagmi/RainbowConnector.ts deleted file mode 100644 index 3f8715d4a4..0000000000 --- a/src/entries/popup/wagmi/RainbowConnector.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { getAddress } from '@ethersproject/address'; -import { - ExternalProvider, - JsonRpcSigner, - Web3Provider, -} from '@ethersproject/providers'; -import { RainbowProvider } from '@rainbow-me/provider'; -import { Chain, Connector } from 'wagmi'; - -import { currentAddressStore, currentChainIdStore } from '~/core/state'; - -function normalizeChainId(chainId: `0x${string}` | number | bigint) { - if (typeof chainId === 'string') return Number(BigInt(chainId)); - if (typeof chainId === 'bigint') return Number(chainId); - return chainId; -} - -export class RainbowConnector extends Connector< - RainbowProvider, - Record, - JsonRpcSigner -> { - readonly id: string; - readonly name: string; - readonly ready = true; - - #provider: RainbowProvider; - - constructor({ - chains, - }: { - chains?: Chain[]; - } = {}) { - super({ chains, options: {} }); - - this.id = 'rainbow'; - this.name = 'rainbow'; - this.#provider = new RainbowProvider(); - } - - async connect() { - const [provider, account, chainId] = await Promise.all([ - this.getProvider(), - this.getAccount(), - this.getChainId(), - ]); - - currentAddressStore.subscribe((state) => { - if (state.currentAddress) { - this.onAccountsChanged([state.currentAddress]); - } - }); - - currentChainIdStore.subscribe((state) => { - if (state.currentChainId) { - this.onChainChanged(state.currentChainId); - } - }); - - return { - account, - chain: { id: chainId, unsupported: false }, - provider: new Web3Provider((provider)), - }; - } - - async disconnect() { - const provider = await this.getProvider(); - if (!provider?.removeListener) return; - - // TODO: Remove event listeners from `connect`. - } - - async isAuthorized() { - return true; - } - - async getAccount() { - const currentAddress = currentAddressStore.getState().currentAddress; - return currentAddress; - } - - async getChainId() { - const currentChainId = currentChainIdStore.getState().currentChainId; - return currentChainId || 1; - } - - async getProvider() { - return this.#provider; - } - - async getSigner({ chainId }: { chainId?: number } = {}) { - const [provider, account] = await Promise.all([ - this.getProvider(), - this.getAccount(), - ]); - return new Web3Provider( - (provider), - chainId, - ).getSigner(account); - } - - protected onAccountsChanged = (accounts: string[]) => { - if (accounts.length === 0) this.emit('disconnect'); - else this.emit('change', { account: getAddress(accounts[0]) }); - }; - - protected onChainChanged = (chainId: number | `0x${string}`) => { - const id = normalizeChainId(chainId); - const unsupported = this.isChainUnsupported(id); - this.emit('change', { chain: { id, unsupported } }); - }; - - protected onDisconnect = () => { - this.emit('disconnect'); - }; -} diff --git a/src/test/utils.ts b/src/test/utils.ts index fcf56f57bc..fe8852c2fb 100644 --- a/src/test/utils.ts +++ b/src/test/utils.ts @@ -111,7 +111,7 @@ export const OPTIMISM_MAINNET_ASSET = { relative_change_24h: 0.14646492502099484, }, symbol: 'ETH', - uniqueId: 'eth_10', + uniqueId: '0x0000000000000000000000000000000000000000_10', } satisfies ParsedUserAsset; export const ENS_MAINNET_ASSET = { diff --git a/static/allowlist.json b/static/allowlist.json index 2664edda4e..08e816f913 100644 --- a/static/allowlist.json +++ b/static/allowlist.json @@ -41,4 +41,4 @@ "https://nftp.rainbow.me/", "https://api.thegraph.com/subgraphs/name/ensdomains/ens" ] -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8632fcdf90..8066965238 100644 --- a/yarn.lock +++ b/yarn.lock @@ -367,6 +367,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.19.4", "@babel/runtime@^7.20.6", "@babel/runtime@^7.21.0": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c" + integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.23.4": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" @@ -461,28 +468,20 @@ resolved "https://registry.yarnpkg.com/@capsizecss/core/-/core-3.0.0.tgz#81b2fb222bd9716d211e4ddd0dc9cc42f71b4f37" integrity sha512-tJNEWMmhHcU5z6ITAiVNN9z+PCTylybVIJqgX7Ts4zN66fe/W2Fe5UWJCCZIP/5uutsl5fYOaVVHZIjsuTVhBQ== -"@coinbase/wallet-sdk@^3.6.6": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz#44b3b7a925ff5cc974e4cbf7a44199ffdcf03541" - integrity sha512-LjyoDCB+7p0waQXfK+fUgcAs3Ezk6S6e+LYaoFjpJ6c9VTop3NyZF40Pi7df4z7QJohCwzuIDjz0Rhtig6Y7Pg== +"@coinbase/wallet-sdk@3.9.1": + version "3.9.1" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.9.1.tgz#503a14671bb392d653623ef2340934e213ac971f" + integrity sha512-cGUE8wm1/cMI8irRMVOqbFWYcnNugqCtuy2lnnHfgloBg+GRLs9RsrkOUDMdv/StfUeeKhCDyYudsXXvcL1xIA== dependencies: - "@metamask/safe-event-emitter" "2.0.0" - "@solana/web3.js" "^1.70.1" - bind-decorator "^1.0.11" - bn.js "^5.1.1" + bn.js "^5.2.1" buffer "^6.0.3" - clsx "^1.1.0" - eth-block-tracker "6.1.0" - eth-json-rpc-filters "5.1.0" - eth-rpc-errors "4.0.2" - json-rpc-engine "6.1.0" - keccak "^3.0.1" - preact "^10.5.9" - qs "^6.10.3" - rxjs "^6.6.3" + clsx "^1.2.1" + eth-block-tracker "^7.1.0" + eth-json-rpc-filters "^6.0.0" + eventemitter3 "^5.0.1" + keccak "^3.0.3" + preact "^10.16.0" sha.js "^2.4.11" - stream-browserify "^3.0.0" - util "^0.12.4" "@devicefarmer/adbkit-logcat@^2.1.2": version "2.1.3" @@ -742,7 +741,7 @@ "@ethereumjs/util" "^9.0.0" ethereum-cryptography "^2.1.2" -"@ethereumjs/tx@^4.1.2": +"@ethereumjs/tx@^4.1.2", "@ethereumjs/tx@^4.2.0": version "4.2.0" resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-4.2.0.tgz#5988ae15daf5a3b3c815493bc6b495e76009e853" integrity sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw== @@ -2005,6 +2004,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.20": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@lavamoat/aa@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@lavamoat/aa/-/aa-4.0.1.tgz#15d8ff88558313ddbf1ea87a13dc9a62e3d4353f" @@ -2043,11 +2050,6 @@ resolved "https://registry.yarnpkg.com/@lavamoat/preinstall-always-fail/-/preinstall-always-fail-2.0.0.tgz#06813fc43d6f08e14045254278c1978b04b34631" integrity sha512-7sgV9DtAD7z7nhxLb2vSjEqgjd3xVk2CbZKwBDVFXkZk1L6xrOIaJTNv5rgNy801/Rjc54KyJ48fHR3djwU35A== -"@ledgerhq/connect-kit-loader@^1.0.1": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.0.tgz#10343b78ef13436818bf3453568a559c0eeb9d48" - integrity sha512-HUy12FEczoWY2FPubnsm1uOA8tkVWc0j90i47suThV3C9NL2xx69ZAIEU3Ytzs2bwLek9S1Q2S1VQJvA+3Ygkg== - "@ledgerhq/cryptoassets@^11.4.0": version "11.4.0" resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-11.4.0.tgz#e32a3ac8eac82530ff5d7ac5df1912b0f187b8cf" @@ -2214,6 +2216,15 @@ resolved "https://registry.yarnpkg.com/@metamask/browser-passworder/-/browser-passworder-4.1.0.tgz#d515db2ffd69ecab813a688e2b7553f2766c5e79" integrity sha512-FBvah1mPte5HudQdkgqAh2+Zc75T9kYxey+dCtHIj9gKohkHDcIA1bTOPLk0bBH+6PnOzYNPG8devvH04GOmPA== +"@metamask/eth-json-rpc-provider@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-1.0.1.tgz#3fd5316c767847f4ca107518b611b15396a5a32c" + integrity sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA== + dependencies: + "@metamask/json-rpc-engine" "^7.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" + "@metamask/eth-sig-util@7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-7.0.0.tgz#b035a2b826018578a5d463668bb64828271376d8" @@ -2239,16 +2250,128 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" -"@metamask/safe-event-emitter@2.0.0", "@metamask/safe-event-emitter@^2.0.0": +"@metamask/json-rpc-engine@^7.0.0", "@metamask/json-rpc-engine@^7.3.2": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-7.3.3.tgz#f2b30a2164558014bfcca45db10f5af291d989af" + integrity sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg== + dependencies: + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + +"@metamask/json-rpc-middleware-stream@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-6.0.2.tgz#75852ce481f8f9f091edbfc04ffdf964f8f3cabd" + integrity sha512-jtyx3PRfc1kqoLpYveIVQNwsxYKefc64/LCl9h9Da1m3nUKEvypbYuXSIwi237qvOjKmNHQKsDOZg6f4uBf62Q== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + readable-stream "^3.6.2" + +"@metamask/object-multiplex@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/object-multiplex/-/object-multiplex-2.0.0.tgz#aa6e4aa7b4e2f457ea4bb51cd7281d931e0aa35d" + integrity sha512-+ItrieVZie3j2LfYE0QkdW3dsEMfMEp419IGx1zyeLqjRZ14iQUPRO0H6CGgfAAoC0x6k2PfCAGRwJUA9BMrqA== + dependencies: + once "^1.4.0" + readable-stream "^3.6.2" + +"@metamask/onboarding@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-1.0.1.tgz#14a36e1e175e2f69f09598e2008ab6dc1b3297e6" + integrity sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ== + dependencies: + bowser "^2.9.0" + +"@metamask/providers@^15.0.0": + version "15.0.0" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-15.0.0.tgz#e8957bb89d2f3379b32b60117d79a141e44db2bc" + integrity sha512-FXvL1NQNl6I7fMOJTfQYcBlBZ33vSlm6w80cMpmn8sJh0Lb7wcBpe02UwBsNlARnI+Qsr26XeDs6WHUHQh8CuA== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/json-rpc-middleware-stream" "^6.0.2" + "@metamask/object-multiplex" "^2.0.0" + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + detect-browser "^5.2.0" + extension-port-stream "^3.0.0" + fast-deep-equal "^3.1.3" + is-stream "^2.0.0" + readable-stream "^3.6.2" + webextension-polyfill "^0.10.0" + +"@metamask/rpc-errors@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.2.1.tgz#f5daf429ededa7cb83069dc621bd5738fe2a1d80" + integrity sha512-VTgWkjWLzb0nupkFl1duQi9Mk8TGT9rsdnQg6DeRrYEFxtFOh0IF8nAwxM/4GWqDl6uIB06lqUBgUrAVWl62Bw== + dependencies: + "@metamask/utils" "^8.3.0" + fast-safe-stringify "^2.0.6" + +"@metamask/safe-event-emitter@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== -"@metamask/utils@^3.0.1": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-3.6.0.tgz#b218b969a05ca7a8093b5d1670f6625061de707d" - integrity sha512-9cIRrfkWvHblSiNDVXsjivqa9Ak0RYo/1H6tqTqTbAx+oBK2Sva0lWDHxGchOqA7bySGUJKAWSNJvH6gdHZ0gQ== +"@metamask/safe-event-emitter@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.1.tgz#e89b840a7af8097a8ed4953d8dc8470d1302d3ef" + integrity sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw== + +"@metamask/sdk-communication-layer@0.18.5": + version "0.18.5" + resolved "https://registry.yarnpkg.com/@metamask/sdk-communication-layer/-/sdk-communication-layer-0.18.5.tgz#4d153512172e6d0ff940f8ff6c50c2796ba49ceb" + integrity sha512-WMf9oJa3rAimjCXMAaaRVFPD0Q6dfZR0r9037KCpD5g9SlVh+TeMISfdQCEKAyhXP3d4CGxmp/Kib8C3mn2YLw== + dependencies: + bufferutil "^4.0.8" + date-fns "^2.29.3" + debug "^4.3.4" + utf-8-validate "^6.0.3" + uuid "^8.3.2" + +"@metamask/sdk-install-modal-web@0.18.5": + version "0.18.5" + resolved "https://registry.yarnpkg.com/@metamask/sdk-install-modal-web/-/sdk-install-modal-web-0.18.5.tgz#f074f0c9a9c4d7272004ebf9792ce816418f13e0" + integrity sha512-Wygc0dgr1PwIA/Sg9WW9QWAsQr4G2GV6iveXt2xw8VKW/9cRORWqYukH1NZLr71hBKzi9AKYBU54Tk5Dfg41zg== + dependencies: + qr-code-styling "^1.6.0-rc.1" + +"@metamask/sdk@0.18.6": + version "0.18.6" + resolved "https://registry.yarnpkg.com/@metamask/sdk/-/sdk-0.18.6.tgz#ac6cfb80d35b179ee6efd9b2b2f6b67e27422e0a" + integrity sha512-ZT8e4BrcWrm44apLb412WR0fDsgeaS8UlI1c0wKRUPu1w/UntpXuUVO+EaY8WDlnOPAiAsjyqWKey64/DfvbXQ== + dependencies: + "@metamask/onboarding" "^1.0.1" + "@metamask/providers" "^15.0.0" + "@metamask/sdk-communication-layer" "0.18.5" + "@metamask/sdk-install-modal-web" "0.18.5" + "@types/dom-screen-wake-lock" "^1.0.0" + bowser "^2.9.0" + cross-fetch "^4.0.0" + debug "^4.3.4" + eciesjs "^0.3.15" + eth-rpc-errors "^4.0.3" + eventemitter2 "^6.4.7" + i18next "22.5.1" + 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.0" + readable-stream "^3.6.2" + rollup-plugin-visualizer "^5.9.2" + socket.io-client "^4.5.1" + util "^0.12.4" + uuid "^8.3.2" + +"@metamask/utils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-5.0.2.tgz#140ba5061d90d9dac0280c19cab101bc18c8857c" + integrity sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g== dependencies: + "@ethereumjs/tx" "^4.1.2" "@types/debug" "^4.1.7" debug "^4.3.4" semver "^7.3.8" @@ -2266,6 +2389,21 @@ semver "^7.5.4" superstruct "^1.0.3" +"@metamask/utils@^8.3.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.4.0.tgz#f44812c96467a4e1b70b2edff6ee89a9caa4e354" + integrity sha512-dbIc3C7alOe0agCuBHM1h71UaEaEqOk2W8rAtEn8QGz4haH2Qq7MoK6i7v2guzvkJVVh79c+QCzIqphC3KvrJg== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + superstruct "^1.0.3" + uuid "^9.0.1" + "@motionone/animation@^10.15.1": version "10.15.1" resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.15.1.tgz#4a85596c31cbc5100ae8eb8b34c459fb0ccf6807" @@ -2476,6 +2614,98 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== +"@parcel/watcher-android-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" + integrity sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg== + +"@parcel/watcher-darwin-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz#c817c7a3b4f3a79c1535bfe54a1c2818d9ffdc34" + integrity sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA== + +"@parcel/watcher-darwin-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz#1a3f69d9323eae4f1c61a5f480a59c478d2cb020" + integrity sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg== + +"@parcel/watcher-freebsd-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz#0d67fef1609f90ba6a8a662bc76a55fc93706fc8" + integrity sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w== + +"@parcel/watcher-linux-arm-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz#ce5b340da5829b8e546bd00f752ae5292e1c702d" + integrity sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA== + +"@parcel/watcher-linux-arm64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz#6d7c00dde6d40608f9554e73998db11b2b1ff7c7" + integrity sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA== + +"@parcel/watcher-linux-arm64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz#bd39bc71015f08a4a31a47cd89c236b9d6a7f635" + integrity sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA== + +"@parcel/watcher-linux-x64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz#0ce29966b082fb6cdd3de44f2f74057eef2c9e39" + integrity sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg== + +"@parcel/watcher-linux-x64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz#d2ebbf60e407170bb647cd6e447f4f2bab19ad16" + integrity sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ== + +"@parcel/watcher-wasm@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz#c4353e4fdb96ee14389856f7f6f6d21b7dcef9e1" + integrity sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA== + dependencies: + is-glob "^4.0.3" + micromatch "^4.0.5" + napi-wasm "^1.1.0" + +"@parcel/watcher-win32-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz#eb4deef37e80f0b5e2f215dd6d7a6d40a85f8adc" + integrity sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg== + +"@parcel/watcher-win32-ia32@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz#94fbd4b497be39fd5c8c71ba05436927842c9df7" + integrity sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw== + +"@parcel/watcher-win32-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz#4bf920912f67cae5f2d264f58df81abfea68dadf" + integrity sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A== + +"@parcel/watcher@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.4.1.tgz#a50275151a1bb110879c6123589dba90c19f1bf8" + integrity sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA== + dependencies: + detect-libc "^1.0.3" + is-glob "^4.0.3" + micromatch "^4.0.5" + node-addon-api "^7.0.0" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.4.1" + "@parcel/watcher-darwin-arm64" "2.4.1" + "@parcel/watcher-darwin-x64" "2.4.1" + "@parcel/watcher-freebsd-x64" "2.4.1" + "@parcel/watcher-linux-arm-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-musl" "2.4.1" + "@parcel/watcher-linux-x64-glibc" "2.4.1" + "@parcel/watcher-linux-x64-musl" "2.4.1" + "@parcel/watcher-win32-arm64" "2.4.1" + "@parcel/watcher-win32-ia32" "2.4.1" + "@parcel/watcher-win32-x64" "2.4.1" + "@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0": version "2.3.3" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777" @@ -3293,10 +3523,10 @@ dependencies: "@babel/runtime" "^7.13.10" -"@rainbow-me/provider@0.0.12": - version "0.0.12" - resolved "https://registry.yarnpkg.com/@rainbow-me/provider/-/provider-0.0.12.tgz#0e46851e409ffa9004f4d1f8a9e579924ffdfc1f" - integrity sha512-hRuTrFUYcYcWSkA9Z8W4XhlQMObkDd0QqQw07DqxDP5EbrT1VQTXSzl5avObts6mEn5i6G0k4g9AnQNzkBZFtA== +"@rainbow-me/provider@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@rainbow-me/provider/-/provider-0.1.0.tgz#7b577604be26f3397085f90b3440aa7528e71e03" + integrity sha512-Omn4GTA92aRMRKj+cT/ixP/aQYCt5WXTQ1ZTBYt4E2B99s68MKlIAKLvqXMtk9KuhMJm5H1rUtjViZ3uuudfvA== dependencies: "@ethersproject/abstract-provider" "5.7.0" "@ethersproject/bignumber" "5.7.0" @@ -3344,29 +3574,21 @@ lodash.isstring "4.0.1" ms "2.1.3" -"@safe-global/safe-apps-provider@^0.15.2": - version "0.15.2" - resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.15.2.tgz#fa5c30140134e72bb969da76b80a16c545323e3a" - integrity sha512-BaoGAuY7h6jLBL7P+M6b7hd+1QfTv8uMyNF3udhiNUwA0XwfzH2ePQB13IEV3Mn7wdcIMEEUDS5kHbtAsj60qQ== +"@safe-global/safe-apps-provider@0.18.1": + version "0.18.1" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.1.tgz#287b5a1e2ef3be630dacde54279409df3ced8202" + integrity sha512-V4a05A3EgJcriqtDoJklDz1BOinWhC6P0hjUSxshA4KOZM7rGPCTto/usXs09zr1vvL28evl/NldSTv97j2bmg== dependencies: - "@safe-global/safe-apps-sdk" "7.9.0" + "@safe-global/safe-apps-sdk" "^8.1.0" events "^3.3.0" -"@safe-global/safe-apps-sdk@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.9.0.tgz#0c79a7760470bfdaf4cce9aa5bceef56898c7037" - integrity sha512-S2EI+JL8ocSgE3uGNaDZCzKmwfhtxXZFDUP76vN0FeaY35itFMyi8F0Vhxu0XnZm3yLzJE3tp5px6GhuQFLU6w== - dependencies: - "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" - ethers "^5.7.2" - -"@safe-global/safe-apps-sdk@^7.9.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.11.0.tgz#2cbc164fb70141cdf4d3331ff222cd98a2529316" - integrity sha512-RDamzPM1Lhhiiz0O+Dn6FkFqIh47jmZX+HCV/BBnBBOSKfBJE//IGD3+02zMgojXHTikQAburdPes9qmH1SA1A== +"@safe-global/safe-apps-sdk@8.1.0", "@safe-global/safe-apps-sdk@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.1.0.tgz#d1d0c69cd2bf4eef8a79c5d677d16971926aa64a" + integrity sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w== dependencies: "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" - ethers "^5.7.2" + viem "^1.0.0" "@safe-global/safe-gateway-typescript-sdk@^3.5.3": version "3.7.3" @@ -3375,6 +3597,11 @@ dependencies: cross-fetch "^3.1.5" +"@scure/base@^1.1.3": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" + integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== + "@scure/base@~1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" @@ -3512,7 +3739,7 @@ dependencies: buffer "~6.0.3" -"@solana/web3.js@1.90.2", "@solana/web3.js@^1.70.1": +"@solana/web3.js@1.90.2": version "1.90.2" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.90.2.tgz#bb4005d4d4bd1021c0ac0c8756091a262e9ec271" integrity sha512-ZIaw/kLaRXnztFL1ddGsUMni/XKWsR4xQkaMLgoWsga5CulXteL8DAyPSiAvJpKAuHOPK7e33Z5+A43xODMT9A== @@ -3674,58 +3901,50 @@ dependencies: defer-to-connect "^2.0.1" -"@tanstack/query-async-storage-persister@4.29.19": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/query-async-storage-persister/-/query-async-storage-persister-4.29.19.tgz#677b0531cac428788933803cbf1491d5b9163375" - integrity sha512-9Kv0+gQoZp8wLf0uA+edhUZQb7ahd6lLmwRQwbca1uYVYmhVlu1IPdkhWlaIy6aGep8ogiApf3N2baOxYVwIJQ== +"@tanstack/query-async-storage-persister@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@tanstack/query-async-storage-persister/-/query-async-storage-persister-5.35.1.tgz#7a5a8e472ad470a2a8266bc6c342228d15a09d60" + integrity sha512-h7w0ohwiPumH01lmd8oY5myHWwVPlfbkeo1q3GW5/rj/er9V1gzjw7j2zsdZfTxlh/zIG64abUqT3pIFby5RVA== dependencies: - "@tanstack/query-persist-client-core" "4.29.19" - -"@tanstack/query-core@4.29.19": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.29.19.tgz#49ccbd0606633d1e55baf3b91ab7cc7aef411b1d" - integrity sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw== + "@tanstack/query-persist-client-core" "5.35.1" -"@tanstack/query-persist-client-core@4.29.19": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/query-persist-client-core/-/query-persist-client-core-4.29.19.tgz#c0cd03eca74d33e5aa40c95cadd5585620ff2320" - integrity sha512-rr6p3xwEZCz3cEDZsj3QGePf6PG44WxRUGQVcm2JFPZOq9TkG/0i5+hQ3STiHm1Fj6qwCH8xIi62L8kG0zRj/Q== - dependencies: - "@tanstack/query-core" "4.29.19" +"@tanstack/query-core@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.35.1.tgz#a7e6cbf0f252475da19ba9cba6567e8fe683b2ee" + integrity sha512-0Dnpybqb8+ps6WgqBnqFEC+1F/xLvUosRAq+wiGisTgolOZzqZfkE2995dEXmhuzINiTM7/a6xSGznU0NIvBkw== -"@tanstack/query-sync-storage-persister@^4.27.1": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/query-sync-storage-persister/-/query-sync-storage-persister-4.29.19.tgz#292d33cdc9b38b11127f2f07b1935a73039cbba4" - integrity sha512-B3wDl3D3YBFTlY2yeXecEh4NEG/8Hr8pqsxnWJijRwBqvOKlqD4bUgk5kl5nbn1mShD2vnQ+yvH900/11X29Zw== +"@tanstack/query-persist-client-core@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@tanstack/query-persist-client-core/-/query-persist-client-core-5.35.1.tgz#0d0751970263d42a5fa1d2630cb439f4fc6e1c21" + integrity sha512-zKannBiI04TY4Ciysaim1PUAA3pgtX2e7yGQxv2aFukMtOrppSNHzcNgl0JwMnFfR2wyxegURA/4PnIa3gQzZA== dependencies: - "@tanstack/query-persist-client-core" "4.29.19" + "@tanstack/query-core" "5.35.1" -"@tanstack/react-query-persist-client@4.29.19", "@tanstack/react-query-persist-client@^4.28.0": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/react-query-persist-client/-/react-query-persist-client-4.29.19.tgz#27b24ec5c8983894d6f23450e2f922d07f47706f" - integrity sha512-LfcasTosdnI9K66HTP0Rk72Ypza3tCgrcF9bc2qFlKsBleYOYo8bz7/GiiOHj1SQH4GRQlKB+P4+/it+qlJg4g== +"@tanstack/react-query-persist-client@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@tanstack/react-query-persist-client/-/react-query-persist-client-5.35.1.tgz#ae05d35798200ee37a0cf07f95a7ab811bce2c58" + integrity sha512-bZwwMmzYaXR/Rq8IliY/eI1QarCraAywTrjaihXvTBuXMzVGIGjdfu9J7pMuHddIEnnPRQGfnaGGcIPRXoT+qA== dependencies: - "@tanstack/query-persist-client-core" "4.29.19" + "@tanstack/query-persist-client-core" "5.35.1" -"@tanstack/react-query@4.29.19", "@tanstack/react-query@^4.28.0": - version "4.29.19" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.29.19.tgz#6ba187f2d0ea36ae83ff1f67068f53c88ce7b228" - integrity sha512-XiTIOHHQ5Cw1WUlHaD4fmVUMhoWjuNJlAeJGq7eM4BraI5z7y8WkZO+NR8PSuRnQGblpuVdjClQbDFtwxTtTUw== +"@tanstack/react-query@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.35.1.tgz#3b7c710bb32c6c71e0cbe64029dded9b0cbd9a0f" + integrity sha512-i2T7m2ffQdNqlX3pO+uMsnQ0H4a59Ens2GxtlMsRiOvdSB4SfYmHb27MnvFV8rGmtWRaa4gPli0/rpDoSS5LbQ== dependencies: - "@tanstack/query-core" "4.29.19" - use-sync-external-store "^1.2.0" + "@tanstack/query-core" "5.35.1" -"@tanstack/react-virtual@3.0.0-beta.54": - version "3.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@tanstack/react-virtual/-/react-virtual-3.0.0-beta.54.tgz#755979455adf13f2584937204a3f38703e446037" - integrity sha512-D1mDMf4UPbrtHRZZriCly5bXTBMhylslm4dhcHqTtDJ6brQcgGmk8YD9JdWBGWfGSWPKoh2x1H3e7eh+hgPXtQ== +"@tanstack/react-virtual@3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@tanstack/react-virtual/-/react-virtual-3.5.0.tgz#873b5b77cf78af563a4a11e6251ed51ee8868132" + integrity sha512-rtvo7KwuIvqK9zb0VZ5IL7fiJAEnG+0EiFZz8FUOs+2mhGqdGmjKIaT1XU7Zq0eFqL0jonLlhbayJI/J2SA/Bw== dependencies: - "@tanstack/virtual-core" "3.0.0-beta.54" + "@tanstack/virtual-core" "3.5.0" -"@tanstack/virtual-core@3.0.0-beta.54": - version "3.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.0.0-beta.54.tgz#12259d007911ad9fce1388385c54a9141f4ecdc4" - integrity sha512-jtkwqdP2rY2iCCDVAFuaNBH3fiEi29aTn2RhtIoky8DTTiCdc48plpHHreLwmv1PICJ4AJUUESaq3xa8fZH8+g== +"@tanstack/virtual-core@3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.5.0.tgz#108208d0f1d75271300bc5560cf9a85a1fa01e89" + integrity sha512-KnPRCkQTyqhanNC0K63GBG3wA8I+D1fQuVnAvcBF8f13akOKeQp1gSbu6f77zCxhEk727iV5oQnbHLYzHrECLg== "@testim/chrome-version@^1.1.4": version "1.1.4" @@ -3871,6 +4090,11 @@ dependencies: "@types/ms" "*" +"@types/dom-screen-wake-lock@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/dom-screen-wake-lock/-/dom-screen-wake-lock-1.0.3.tgz#c3588a5f6f40fae957f9ce5be9bc4927a61bb9a0" + integrity sha512-3Iten7X3Zgwvk6kh6/NRdwN7WbZ760YgFCsF5AxDifltUQzW1RaW+WRmcVtgwFzLjaNu64H+0MPJ13yRa8g3Dw== + "@types/eslint-scope@^3.7.3": version "3.7.4" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" @@ -3897,6 +4121,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/filesystem@*": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.32.tgz#307df7cc084a2293c3c1a31151b178063e0a8edf" @@ -4102,6 +4331,13 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/secp256k1@^4.0.4": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" + integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== + dependencies: + "@types/node" "*" + "@types/selenium-webdriver@4.1.15": version "4.1.15" resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.1.15.tgz#d346b674b96f5ba43f1ad5343f997030559e5b23" @@ -4603,80 +4839,50 @@ loupe "^2.3.6" pretty-format "^29.5.0" -"@wagmi/chains@0.2.22": - version "0.2.22" - resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-0.2.22.tgz#25e511e134a00742e4fbf5108613dadf876c5bd9" - integrity sha512-TdiOzJT6TO1JrztRNjTA5Quz+UmQlbvWFG8N41u9tta0boHA1JCAzGGvU6KuIcOmJfRJkKOUIt67wlbopCpVHg== - -"@wagmi/connectors@0.3.24": - version "0.3.24" - resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-0.3.24.tgz#2c1d69fc0ae6b85b75a4d57547fc7e2d4bc117e8" - integrity sha512-1pI0G9HRblc651dCz9LXuEu/zWQk23XwOUYqJEINb/c2TTLtw5TnTRIcefxxK6RnxeJvcKfnmK0rdZp/4ujFAA== - dependencies: - "@coinbase/wallet-sdk" "^3.6.6" - "@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.9.0" - "@walletconnect/legacy-provider" "^2.0.0" - "@walletconnect/modal" "^2.5.9" - abitype "^0.3.0" - eventemitter3 "^4.0.7" +"@wagmi/connectors@4.3.3": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-4.3.3.tgz#07d5381fdf3752ba98a9903fecc33ced9dea3ae1" + integrity sha512-6u/HbWlIS2MI5lxBYbsqNZIQT4sBleFt8rhzH7mJBrHH6v95LmeZZ3qZFpWdopx4bQ6maNEZOIJnCLhv7k37DQ== + dependencies: + "@coinbase/wallet-sdk" "3.9.1" + "@metamask/sdk" "0.18.6" + "@safe-global/safe-apps-provider" "0.18.1" + "@safe-global/safe-apps-sdk" "8.1.0" + "@walletconnect/ethereum-provider" "2.11.2" + "@walletconnect/modal" "2.6.2" -"@wagmi/core@0.10.17": - version "0.10.17" - resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.17.tgz#d2a641c3c608cad813e9eed290769d577512d935" - integrity sha512-qud45y3IlHp7gYWzoFeyysmhyokRie59Xa5tcx5F1E/v4moD5BY0kzD26mZW/ZQ3WZuVK/lZwiiPRqpqWH52Gw== +"@wagmi/core@2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-2.9.1.tgz#e1cb60106766ca14778cf795795c7c71644f7ca0" + integrity sha512-VUILlj0qFmZEa9XpNsYhIaQe3jsJdFGSRSbn+xsvGBo+yZpNxQXuaLo3+ntuv1kTFdw8Qzk17fLGy2U9a0XFdA== dependencies: - "@wagmi/chains" "0.2.22" - "@wagmi/connectors" "0.3.24" - abitype "^0.3.0" - eventemitter3 "^4.0.7" - zustand "^4.3.1" + eventemitter3 "5.0.1" + mipd "0.0.5" + zustand "4.4.1" -"@walletconnect/core@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.0.tgz#7837a5d015a22b48d35b987bcde2aa9ccdf300d8" - integrity sha512-MZYJghS9YCvGe32UOgDj0mCasaOoGHQaYXWeQblXE/xb8HuaM6kAWhjIQN9P+MNp5QP134BHP5olQostcCotXQ== +"@walletconnect/core@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.11.2.tgz#35286be92c645fa461fecc0dfe25de9f076fca8f" + integrity sha512-bB4SiXX8hX3/hyBfVPC5gwZCXCl+OPj+/EDVM71iAO3TDsh78KPbrVAbDnnsbHzZVHlsMohtXX3j5XVsheN3+g== dependencies: "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-provider" "1.0.13" "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "1.0.12" - "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "^1.1.1" "@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.9.0" - "@walletconnect/utils" "2.9.0" + "@walletconnect/types" "2.11.2" + "@walletconnect/utils" "2.11.2" events "^3.3.0" + isomorphic-unfetch "3.1.0" lodash.isequal "4.5.0" uint8arrays "^3.1.0" -"@walletconnect/crypto@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@walletconnect/crypto/-/crypto-1.0.3.tgz#7b8dd4d7e2884fe3543c7c07aea425eef5ef9dd4" - integrity sha512-+2jdORD7XQs76I2Odgr3wwrtyuLUXD/kprNVsjWRhhhdO9Mt6WqVzOPu0/t7OHSmgal8k7SoBQzUc5hu/8zL/g== - dependencies: - "@walletconnect/encoding" "^1.0.2" - "@walletconnect/environment" "^1.0.1" - "@walletconnect/randombytes" "^1.0.3" - aes-js "^3.1.2" - hash.js "^1.1.7" - tslib "1.14.1" - -"@walletconnect/encoding@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@walletconnect/encoding/-/encoding-1.0.2.tgz#cb3942ad038d6a6bf01158f66773062dd25724da" - integrity sha512-CrwSBrjqJ7rpGQcTL3kU+Ief+Bcuu9PH6JLOb+wM6NITX1GTxR/MfNwnQfhLKK6xpRAyj2/nM04OOH6wS8Imag== - dependencies: - is-typedarray "1.0.0" - tslib "1.14.1" - typedarray-to-buffer "3.1.5" - "@walletconnect/environment@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/environment/-/environment-1.0.1.tgz#1d7f82f0009ab821a2ba5ad5e5a7b8ae3b214cd7" @@ -4684,19 +4890,20 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.9.0.tgz#aa6e9e441678c824af8f744c50dafd604f19d69e" - integrity sha512-rSXkC0SXMigJRdIi/M2RMuEuATY1AwtlTWQBnqyxoht7xbO2bQNPCXn0XL4s/GRNrSUtoKSY4aPMHXV4W4yLBA== +"@walletconnect/ethereum-provider@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.11.2.tgz#914f773e37a879bc00cf367437c4e98a826247b1" + integrity sha512-BUDqee0Uy2rCZVkW5Ao3q6Ado/3fePYnFdryVF+YL6bPhj+xQZ5OfKodl+uvs7Rwq++O5wTX2RqOTzpW7+v+Mg== dependencies: "@walletconnect/jsonrpc-http-connection" "^1.0.7" "@walletconnect/jsonrpc-provider" "^1.0.13" "@walletconnect/jsonrpc-types" "^1.0.3" "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/sign-client" "2.9.0" - "@walletconnect/types" "2.9.0" - "@walletconnect/universal-provider" "2.9.0" - "@walletconnect/utils" "2.9.0" + "@walletconnect/modal" "^2.6.2" + "@walletconnect/sign-client" "2.11.2" + "@walletconnect/types" "2.11.2" + "@walletconnect/universal-provider" "2.11.2" + "@walletconnect/utils" "2.11.2" events "^3.3.0" "@walletconnect/events@^1.0.1": @@ -4716,7 +4923,7 @@ "@walletconnect/time" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-http-connection@^1.0.4", "@walletconnect/jsonrpc-http-connection@^1.0.7": +"@walletconnect/jsonrpc-http-connection@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz#a6973569b8854c22da707a759d241e4f5c2d5a98" integrity sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ== @@ -4726,7 +4933,7 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.13": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -4743,7 +4950,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -4752,84 +4959,24 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.12.tgz#2192314884fabdda6d0a9d22e157e5b352025ed8" - integrity sha512-HAcadga3Qjt1Cqy+qXEW6zjaCs8uJGdGQrqltzl3OjiK4epGZRdvSzTe63P+t/3z+D2wG+ffEPn0GVcDozmN1w== +"@walletconnect/jsonrpc-ws-connection@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" + integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== 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" - integrity sha512-U/nNG+VLWoPFdwwKx0oliT4ziKQCEoQ27L5Hhw8YOFGA2Po9A9pULUYNWhDgHkrb0gYDNt//X7wABcEWWBd3FQ== - dependencies: - safe-json-utils "^1.1.1" - tslib "1.14.1" - -"@walletconnect/legacy-client@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@walletconnect/legacy-client/-/legacy-client-2.0.0.tgz#9f2c09694789fd4b6c5d68d6423b44bac55aed30" - integrity sha512-v5L7rYk9loVnfvUf0mF+76bUPFaU5/Vh7mzL6/950CD/yoGdzYZ3Kj+L7mkC6HPMEGeQsBP1+sqBuiVGZ/aODA== - dependencies: - "@walletconnect/crypto" "^1.0.3" - "@walletconnect/encoding" "^1.0.2" - "@walletconnect/jsonrpc-utils" "^1.0.4" - "@walletconnect/legacy-types" "^2.0.0" - "@walletconnect/legacy-utils" "^2.0.0" - "@walletconnect/safe-json" "^1.0.1" - "@walletconnect/window-getters" "^1.0.1" - "@walletconnect/window-metadata" "^1.0.1" - detect-browser "^5.3.0" - query-string "^6.13.5" - -"@walletconnect/legacy-modal@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@walletconnect/legacy-modal/-/legacy-modal-2.0.0.tgz#d0fab01a1337a8f5d88cdb1430cbef2d46072bbf" - integrity sha512-jckNd8lMhm4X7dX9TDdxM3bXKJnaqkRs6K2Mo5j6GmbIF9Eyx40jZ5+q457RVxvM6ciZEDT5s1wBHWdWoOo+9Q== - dependencies: - "@walletconnect/legacy-types" "^2.0.0" - "@walletconnect/legacy-utils" "^2.0.0" - copy-to-clipboard "^3.3.3" - preact "^10.12.0" - qrcode "^1.5.1" - -"@walletconnect/legacy-provider@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@walletconnect/legacy-provider/-/legacy-provider-2.0.0.tgz#08e2db1e4c234743b2f30422bc8100bc42e8fc44" - integrity sha512-A8xPebMI1A+50HbWwTpFCbwP7G+1NGKdTKyg8BUUg3h3Y9JucpC1W6w/x0v1Xw7qFEqQnz74LoIN/A3ytH9xrQ== - dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.4" - "@walletconnect/jsonrpc-provider" "^1.0.6" - "@walletconnect/legacy-client" "^2.0.0" - "@walletconnect/legacy-modal" "^2.0.0" - "@walletconnect/legacy-types" "^2.0.0" - "@walletconnect/legacy-utils" "^2.0.0" - -"@walletconnect/legacy-types@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@walletconnect/legacy-types/-/legacy-types-2.0.0.tgz#224278ae2874c6a2ca805c2d1d062a511dcf7227" - integrity sha512-sOVrA7HUdbI1OwKyPOQU0/DdvTSVFlsXWpAk2K2WvP2erTkBWPMTJq6cv2BmKdoJ3p6gLApT7sd+jHi3OF71uw== - dependencies: - "@walletconnect/jsonrpc-types" "^1.0.2" - -"@walletconnect/legacy-utils@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@walletconnect/legacy-utils/-/legacy-utils-2.0.0.tgz#e3a637c00783f9cd2ae139b640f82223ab78ed9d" - integrity sha512-CPWxSVVXw0kgNCxvU126g4GiV3mzXmC8IPJ15twE46aJ1FX+RHEIfAzFMFz2F2+fEhBxL63A7dwNQKDXorRPcQ== +"@walletconnect/keyvaluestorage@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" + integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== dependencies: - "@walletconnect/encoding" "^1.0.2" - "@walletconnect/jsonrpc-utils" "^1.0.4" - "@walletconnect/legacy-types" "^2.0.0" "@walletconnect/safe-json" "^1.0.1" - "@walletconnect/window-getters" "^1.0.1" - "@walletconnect/window-metadata" "^1.0.1" - detect-browser "^5.3.0" - query-string "^6.13.5" + idb-keyval "^6.2.1" + unstorage "^1.9.0" "@walletconnect/logger@^2.0.1": version "2.0.1" @@ -4856,7 +5003,7 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@^2.5.9": +"@walletconnect/modal@2.6.2", "@walletconnect/modal@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== @@ -4864,16 +5011,6 @@ "@walletconnect/modal-core" "2.6.2" "@walletconnect/modal-ui" "2.6.2" -"@walletconnect/randombytes@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@walletconnect/randombytes/-/randombytes-1.0.3.tgz#e795e4918367fd1e6a2215e075e64ab93e23985b" - integrity sha512-35lpzxcHFbTN3ABefC9W+uBpNZl1GC4Wpx0ed30gibfO/y9oLdy1NznbV96HARQKSBV9J9M/rrtIvf6a23jfYw== - dependencies: - "@walletconnect/encoding" "^1.0.2" - "@walletconnect/environment" "^1.0.1" - randombytes "^2.1.0" - tslib "1.14.1" - "@walletconnect/relay-api@^1.0.9": version "1.0.9" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.9.tgz#f8c2c3993dddaa9f33ed42197fc9bfebd790ecaf" @@ -4901,19 +5038,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.0.tgz#fd3b0acb68bc8d56350f01ed70f8c6326e6e89fa" - integrity sha512-mEKc4LlLMebCe45qzqh+MX4ilQK4kOEBzLY6YJpG8EhyT45eX4JMNA7qQoYa9MRMaaVb/7USJcc4e3ZrjZvQmA== +"@walletconnect/sign-client@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.11.2.tgz#855609653855f0d23b0502cdbdcf43402e34c459" + integrity sha512-MfBcuSz2GmMH+P7MrCP46mVE5qhP0ZyWA0FyIH6/WuxQ6G+MgKsGfaITqakpRPsykWOJq8tXMs3XvUPDU413OQ== dependencies: - "@walletconnect/core" "2.9.0" + "@walletconnect/core" "2.11.2" "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "^2.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.9.0" - "@walletconnect/utils" "2.9.0" + "@walletconnect/types" "2.11.2" + "@walletconnect/utils" "2.11.2" events "^3.3.0" "@walletconnect/time@^1.0.2": @@ -4923,37 +5060,37 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.0.tgz#6e5dfdc7212c1ec4ab49a1ec409c743e16093f72" - integrity sha512-ORopsMfSRvUYqtjKKd6scfg8o4/aGebipLxx92AuuUgMTERSU6cGmIrK6rdLu7W6FBJkmngPLEGc9mRqAb9Lug== +"@walletconnect/types@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.11.2.tgz#d0359dd4106fcaa1634241a00428d3ea08d0d3c7" + integrity sha512-p632MFB+lJbip2cvtXPBQslpUdiw1sDtQ5y855bOlAGquay+6fZ4h1DcDePeKQDQM3P77ax2a9aNPZxV6y/h1Q== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/keyvaluestorage" "^1.1.1" "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/universal-provider@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.9.0.tgz#a6b4a1f099262536e17b5c25bf7b3c89db9945a8" - integrity sha512-k3nkSBkF69sJJVoe17IVoPtnhp/sgaa2t+x7BvA/BKeMxE0DGdtRJdEXotTc8DBmI7o2tkq6l8+HyFBGjQ/CjQ== +"@walletconnect/universal-provider@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.11.2.tgz#bec3038f51445d707bbec75f0cb8af0a1f1e04db" + integrity sha512-cNtIn5AVoDxKAJ4PmB8m5adnf5mYQMUamEUPKMVvOPscfGtIMQEh9peKsh2AN5xcRVDbgluC01Id545evFyymw== dependencies: "@walletconnect/jsonrpc-http-connection" "^1.0.7" "@walletconnect/jsonrpc-provider" "1.0.13" "@walletconnect/jsonrpc-types" "^1.0.2" "@walletconnect/jsonrpc-utils" "^1.0.7" "@walletconnect/logger" "^2.0.1" - "@walletconnect/sign-client" "2.9.0" - "@walletconnect/types" "2.9.0" - "@walletconnect/utils" "2.9.0" + "@walletconnect/sign-client" "2.11.2" + "@walletconnect/types" "2.11.2" + "@walletconnect/utils" "2.11.2" events "^3.3.0" -"@walletconnect/utils@2.9.0": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.9.0.tgz#c73925edb9fefe79021bcf028e957028f986b728" - integrity sha512-7Tu3m6dZL84KofrNBcblsgpSqU2vdo9ImLD7zWimLXERVGNQ8smXG+gmhQYblebIBhsPzjy9N38YMC3nPlfQNw== +"@walletconnect/utils@2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.11.2.tgz#dee0f19adf5e38543612cbe9fa4de7ed28eb7e85" + integrity sha512-LyfdmrnZY6dWqlF4eDrx5jpUwsB2bEPjoqR5Z6rXPiHJKUOdJt7az+mNOn5KTSOlRpd1DmozrBrWr+G9fFLYVw== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" @@ -4963,7 +5100,7 @@ "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.9.0" + "@walletconnect/types" "2.11.2" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" @@ -5003,21 +5140,44 @@ "@webassemblyjs/helper-numbers" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/floating-point-hex-parser@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + "@webassemblyjs/helper-api-error@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + "@webassemblyjs/helper-buffer@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== + "@webassemblyjs/helper-numbers@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" @@ -5027,11 +5187,25 @@ "@webassemblyjs/helper-api-error" "1.11.1" "@xtuc/long" "4.2.2" +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + "@webassemblyjs/helper-wasm-bytecode@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + "@webassemblyjs/helper-wasm-section@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" @@ -5042,6 +5216,16 @@ "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/wasm-gen" "1.11.1" +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/ieee754@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" @@ -5049,6 +5233,13 @@ dependencies: "@xtuc/ieee754" "^1.2.0" +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + "@webassemblyjs/leb128@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" @@ -5056,11 +5247,23 @@ dependencies: "@xtuc/long" "4.2.2" +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + "@webassemblyjs/utf8@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + "@webassemblyjs/wasm-edit@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" @@ -5075,6 +5278,20 @@ "@webassemblyjs/wasm-parser" "1.11.1" "@webassemblyjs/wast-printer" "1.11.1" +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + "@webassemblyjs/wasm-gen@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" @@ -5086,6 +5303,17 @@ "@webassemblyjs/leb128" "1.11.1" "@webassemblyjs/utf8" "1.11.1" +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + "@webassemblyjs/wasm-opt@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" @@ -5096,6 +5324,16 @@ "@webassemblyjs/wasm-gen" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wasm-parser@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" @@ -5108,6 +5346,18 @@ "@webassemblyjs/leb128" "1.11.1" "@webassemblyjs/utf8" "1.11.1" +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + "@webassemblyjs/wast-printer@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" @@ -5116,6 +5366,14 @@ "@webassemblyjs/ast" "1.11.1" "@xtuc/long" "4.2.2" +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@xtuc/long" "4.2.2" + "@webpack-cli/configtest@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" @@ -5174,10 +5432,10 @@ abitype@0.9.8: resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ== -abitype@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.3.0.tgz#75150e337d88cc0b2423ed0d3fc36935f139d04c" - integrity sha512-0YokyAV4hKMcy97Pl+6QgZBlBdZJN2llslOs7kiFY+cu7kMlVXDBpxMExfv0krzBCQt2t7hNovpQ3y/zvEm18A== +abitype@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.0.tgz#237176dace81d90d018bebf3a45cb42f2a2d9e97" + integrity sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ== abort-controller@^3.0.0: version "3.0.0" @@ -5186,7 +5444,7 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -acorn-import-assertions@^1.7.6: +acorn-import-assertions@^1.7.6, acorn-import-assertions@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== @@ -5225,6 +5483,11 @@ acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.11.3: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + acorn@^8.8.2, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" @@ -5295,11 +5558,6 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -aes-js@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" - integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== - agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -5454,6 +5712,14 @@ anymatch@^3.0.0, anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +anymatch@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + "aproba@^1.0.3 || ^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" @@ -5892,11 +6158,6 @@ binary@~0.3.0: buffers "~0.1.1" chainsaw "~0.1.0" -bind-decorator@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f" - integrity sha512-yzkH0uog6Vv/vQ9+rhSKxecnqGUZHYncg7qS7voz3Q76+TAi1SGiOKk2mlOvusQnFz9Dc4BC/NMkeXu11YgjJg== - bindings@1.5.0, bindings@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -5928,7 +6189,7 @@ bmp-js@^0.1.0: resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233" integrity sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw== -bn.js@5.2.1, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9, bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@5.2.1, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9, bn.js@^5.0.0, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -5947,6 +6208,11 @@ borsh@^0.7.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" +bowser@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" + integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== + boxen@^7.0.0: version "7.1.1" resolved "https://registry.yarnpkg.com/boxen/-/boxen-7.1.1.tgz#f9ba525413c2fec9cdb88987d835c4f7cad9c8f4" @@ -6132,6 +6398,16 @@ browserslist@^4.14.5, browserslist@^4.21.3: node-releases "^2.0.6" update-browserslist-db "^1.0.9" +browserslist@^4.21.10: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -6221,6 +6497,13 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +bufferutil@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -6357,6 +6640,11 @@ caniuse-lite@^1.0.30001400: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz#30f67d55a865da43e0aeec003f073ea8764d5d7c" integrity sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA== +caniuse-lite@^1.0.30001587: + version "1.0.30001616" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz#4342712750d35f71ebba9fcac65e2cf8870013c3" + integrity sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -6478,6 +6766,21 @@ chokidar@^3.4.2: optionalDependencies: fsevents "~2.3.2" +chokidar@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" @@ -6539,6 +6842,13 @@ circular-dependency-plugin@5.2.2: resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz#39e836079db1d3cf2f988dc48c5188a44058b600" integrity sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ== +citty@^0.1.5, citty@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" + integrity sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ== + dependencies: + consola "^3.2.3" + cjs-module-lexer@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" @@ -6594,6 +6904,15 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +clipboardy@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-4.0.0.tgz#e73ced93a76d19dd379ebf1f297565426dffdca1" + integrity sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w== + dependencies: + execa "^8.0.1" + is-wsl "^3.1.0" + is64bit "^2.0.0" + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -6646,7 +6965,7 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== -clsx@1.2.1, clsx@^1.1.0: +clsx@1.2.1, clsx@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== @@ -6830,6 +7149,11 @@ concat-stream@^1.4.7, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@ readable-stream "^2.2.2" typedarray "^0.0.6" +confbox@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" + integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== + config-chain@^1.1.11: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -6849,6 +7173,11 @@ configstore@^6.0.0: write-file-atomic "^3.0.3" xdg-basedir "^5.0.1" +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" @@ -6879,18 +7208,16 @@ convert-source-map@~1.1.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" integrity sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg== +cookie-es@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.1.0.tgz#68f8d9f48aeb5a534f3896f80e792760d3d20def" + integrity sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw== + cookie@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== -copy-to-clipboard@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz#55ac43a1db8ae639a4bd99511c148cdd1b83a1b0" - integrity sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA== - dependencies: - toggle-selection "^1.0.6" - copy-webpack-plugin@11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz#96d4dbdb5f73d02dd72d0528d1958721ab72e04a" @@ -6966,6 +7293,13 @@ cross-fetch@^3.1.4, cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" +cross-fetch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" + integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -6986,6 +7320,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crossws@^0.2.0, crossws@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" + integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== + crypt@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -7115,6 +7454,13 @@ date-fns@2.29.3: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== +date-fns@^2.29.3: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + dateformat@~3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -7163,7 +7509,7 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decode-uri-component@0.2.1, decode-uri-component@^0.2.0, decode-uri-component@^0.2.2: +decode-uri-component@0.2.1, decode-uri-component@^0.2.2: version "0.2.1" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.1.tgz#e9d7afd716fc1a7ec6ae7cc0aa3e540a1eac2e9d" integrity sha512-XZHyaFJ6QMWhYmlz+UcmtaLeecNiXwkTGzCqG5WByt+1P1HnU6Siwf0TeP3OsZmlnGqQRSEMIxue0LLCaGY3dw== @@ -7308,6 +7654,11 @@ defined@^1.0.0: resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ== +defu@^6.1.3, defu@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" + integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== + delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" @@ -7341,7 +7692,12 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -detect-browser@5.3.0, detect-browser@^5.3.0: +destr@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" + integrity sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== + +detect-browser@5.3.0, detect-browser@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== @@ -7351,6 +7707,11 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -7580,6 +7941,15 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" +eciesjs@^0.3.15: + version "0.3.18" + resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.3.18.tgz#67b5d73a8466e40a45bbc2f2a3177e71e9c0643d" + integrity sha512-RQhegEtLSyIiGJmFTZfvCTHER/fymipXFVx6OwSRYD6hOuy+6Kjpk0dGvIfP9kxn/smBpxQy71uxpGO406ITCw== + dependencies: + "@types/secp256k1" "^4.0.4" + futoin-hkdf "^1.5.3" + secp256k1 "^5.0.0" + eip55@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/eip55/-/eip55-2.1.1.tgz#28b743c4701ac3c811b1e9fe67e39cf1d0781b96" @@ -7592,6 +7962,11 @@ electron-to-chromium@^1.4.251: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.267.tgz#77d7de2b92806e3e1df8882a982aece815d6b6ea" integrity sha512-ik4QnU3vFRsVgwt0vsn7og28++2cGnsdgqYagaE3ur1f3wj5AzmWu+1k3//SOc6CwkP2xfu46PNfVP6X+SRepg== +electron-to-chromium@^1.4.668: + version "1.4.758" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.758.tgz#f39e530cae2ca4329a0f0e1840629d8d1da73156" + integrity sha512-/o9x6TCdrYZBMdGeTifAP3wlF/gVT+TtWJe3BSmtNh92Mw81U9hrYwW9OAGUh+sEOX/yz5e34sksqRruZbjYrw== + elliptic@6.5.4, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -7637,7 +8012,7 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.1.0, end-of-stream@^1.4.1, end-of-stream@~1.4.1: +end-of-stream@^1.1.0, end-of-stream@^1.4.0, end-of-stream@^1.4.1, end-of-stream@~1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -7655,11 +8030,27 @@ engine.io-client@~6.2.3: ws "~8.2.3" xmlhttprequest-ssl "~2.0.0" +engine.io-client@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.3.tgz#4cf6fa24845029b238f83c628916d9149c399bc5" + integrity sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.11.0" + xmlhttprequest-ssl "~2.0.0" + engine.io-parser@~5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== + enhanced-resolve@^5.0.0: version "5.10.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" @@ -7676,6 +8067,14 @@ enhanced-resolve@^5.10.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enhanced-resolve@^5.16.0: + version "5.16.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" + integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -8020,21 +8419,26 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-goat@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-4.0.0.tgz#9424820331b510b0666b98f7873fe11ac4aa8081" integrity sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg== +escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -8365,22 +8769,23 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eth-block-tracker@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-6.1.0.tgz#0481f97bbb88a100b9d45806fe7e37af741cbefc" - integrity sha512-K9SY8+/xMBi4M5HHTDdxnpEqEEGjbNpzHFqvxyjMZej8InV/B+CkFRKM6W+uvrFJ7m8Zd1E0qUkseU3vdIDFYQ== +eth-block-tracker@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-7.1.0.tgz#dfc16085c6817cc30caabba381deb8d204c1c766" + integrity sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg== dependencies: - "@metamask/safe-event-emitter" "^2.0.0" - "@metamask/utils" "^3.0.1" + "@metamask/eth-json-rpc-provider" "^1.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" json-rpc-random-id "^1.0.1" pify "^3.0.0" -eth-json-rpc-filters@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-5.1.0.tgz#f0c2aeaec2a45e2dc6ca1b9843d8e85447821427" - integrity sha512-fos+9xmoa1A2Ytsc9eYof17r81BjdJOUcGcgZn4K/tKdCCTb+a8ytEtwlu1op5qsXFDlgGmstTELFrDEc89qEQ== +eth-json-rpc-filters@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-6.0.1.tgz#0b3e370f017f5c6f58d3e7bd0756d8099ed85c56" + integrity sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig== dependencies: - "@metamask/safe-event-emitter" "^2.0.0" + "@metamask/safe-event-emitter" "^3.0.0" async-mutex "^0.2.6" eth-query "^2.1.2" json-rpc-engine "^6.1.0" @@ -8394,14 +8799,7 @@ eth-query@^2.1.2: json-rpc-random-id "^1.0.0" xtend "^4.0.1" -eth-rpc-errors@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.2.tgz#11bc164e25237a679061ac05b7da7537b673d3b7" - integrity sha512-n+Re6Gu8XGyfFy1it0AwbD1x0MUzspQs0D5UiPs1fFPCr6WAwZM+vbIhXheBFrpgosqN9bs5PqlB4Q61U/QytQ== - dependencies: - fast-safe-stringify "^2.0.6" - -eth-rpc-errors@^4.0.2: +eth-rpc-errors@^4.0.2, eth-rpc-errors@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== @@ -8418,7 +8816,7 @@ ethereum-cryptography@2.1.2, ethereum-cryptography@^2.0.0, ethereum-cryptography "@scure/bip32" "1.3.1" "@scure/bip39" "1.2.1" -ethers@5.7.2, ethers@^5.0.0, ethers@^5.7.2: +ethers@5.7.2, ethers@^5.0.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -8487,6 +8885,11 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter2@^6.4.7: + version "6.4.9" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" + integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== + eventemitter2@~0.4.13: version "0.4.14" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" @@ -8497,7 +8900,7 @@ eventemitter3@4.0.7, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -eventemitter3@5.0.1: +eventemitter3@5.0.1, eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== @@ -8575,6 +8978,21 @@ execa@^7.1.1: signal-exit "^3.0.7" strip-final-newline "^3.0.0" +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + exif-parser@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/exif-parser/-/exif-parser-0.1.12.tgz#58a9d2d72c02c1f6f02a0ef4a9166272b7760922" @@ -8628,6 +9046,14 @@ extend@^3.0.2, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +extension-port-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-3.0.0.tgz#00a7185fe2322708a36ed24843c81bd754925fef" + integrity sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw== + dependencies: + readable-stream "^3.6.2 || ^4.4.2" + webextension-polyfill ">=0.10.0 <1.0" + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -9132,6 +9558,11 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +futoin-hkdf@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.5.3.tgz#6c8024f2e1429da086d4e18289ef2239ad33ee35" + integrity sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ== + fx-runner@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fx-runner/-/fx-runner-1.3.0.tgz#763f17088798c462037161bdfa40085cfd359831" @@ -9237,6 +9668,11 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-port-please@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/get-port-please/-/get-port-please-3.1.2.tgz#502795e56217128e4183025c89a48c71652f4e49" + integrity sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ== + get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -9249,6 +9685,11 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -9470,7 +9911,7 @@ graceful-fs@4.2.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.2.2, graceful-fs@^4.2.6: +graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -9585,6 +10026,22 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" +h3@^1.10.2, h3@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.11.1.tgz#e9414ae6f2a076a345ea07256b320edb29bab9f7" + integrity sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A== + dependencies: + cookie-es "^1.0.0" + crossws "^0.2.2" + defu "^6.1.4" + destr "^2.0.3" + iron-webcrypto "^1.0.0" + ohash "^1.1.3" + radix3 "^1.1.0" + ufo "^1.4.0" + uncrypto "^0.1.3" + unenv "^1.9.0" + happy-dom@8.9.0: version "8.9.0" resolved "https://registry.yarnpkg.com/happy-dom/-/happy-dom-8.9.0.tgz#b7c9986538b83c3ca3197ce22a1d27a1777c49d9" @@ -9685,7 +10142,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -9824,6 +10281,11 @@ http-proxy-agent@^7.0.0: agent-base "^7.1.0" debug "^4.3.4" +http-shutdown@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" + integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -9882,6 +10344,11 @@ human-signals@^4.3.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -9902,6 +10369,20 @@ i18n-js@4.1.1: bignumber.js "*" lodash "*" +i18next-browser-languagedetector@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.1.0.tgz#01876fac51f86b78975e79b48ccb62e2313a2d7d" + integrity sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA== + dependencies: + "@babel/runtime" "^7.19.4" + +i18next@22.5.1: + version "22.5.1" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.1.tgz#99df0b318741a506000c243429a7352e5f44d424" + integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA== + dependencies: + "@babel/runtime" "^7.20.6" + iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -9921,6 +10402,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +idb-keyval@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" + integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== + idb@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/idb/-/idb-7.0.1.tgz#d2875b3a2f205d854ee307f6d196f246fea590a7" @@ -10111,7 +10597,7 @@ interpret@~1.1.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" integrity sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA== -invariant@2, invariant@^2.2.2, invariant@^2.2.4: +invariant@2, invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -10141,6 +10627,11 @@ ip@2.0.1: resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== +iron-webcrypto@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.1.1.tgz#245c9d467075ee810343ddfa53dd4909616aaf33" + integrity sha512-5xGwQUWHQSy039rFr+5q/zOmj7GP0Ypzvo34Ep+61bPIhaLduEDp/PvLGlU3awD2mzWUR0weN2vJ1mILydFPEg== + is-absolute@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f" @@ -10467,7 +10958,7 @@ is-typed-array@^1.1.3, is-typed-array@^1.1.9: for-each "^0.3.3" has-tostringtag "^1.0.0" -is-typedarray@1.0.0, is-typedarray@^1.0.0, is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== @@ -10513,6 +11004,13 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + is-yarn-global@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.1.tgz#b312d902b313f81e4eaf98b6361ba2b45cd694bb" @@ -10527,6 +11025,13 @@ is2@^2.0.6: ip-regex "^4.1.0" is-url "^1.2.4" +is64bit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" + integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== + dependencies: + system-architecture "^0.1.0" + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -10557,6 +11062,14 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -11012,6 +11525,11 @@ jest@29.2.0: import-local "^3.0.2" jest-cli "^29.2.0" +jiti@^1.21.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" + integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== + jju@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" @@ -11109,7 +11627,7 @@ json-parse-even-better-errors@^3.0.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz#2cb2ee33069a78870a0c7e3da560026b89669cf7" integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== -json-rpc-engine@6.1.0, json-rpc-engine@^6.1.0: +json-rpc-engine@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz#bf5ff7d029e1c1bf20cb6c0e9f348dcd8be5a393" integrity sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ== @@ -11248,15 +11766,6 @@ jws@^3.2.2: jwa "^1.4.1" safe-buffer "^5.0.1" -keccak@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" - integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - keccak@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" @@ -11484,6 +11993,30 @@ listenercount@~1.0.1: resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== +listhen@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.7.2.tgz#66b81740692269d5d8cafdc475020f2fc51afbae" + integrity sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g== + dependencies: + "@parcel/watcher" "^2.4.1" + "@parcel/watcher-wasm" "^2.4.1" + citty "^0.1.6" + clipboardy "^4.0.0" + consola "^3.2.3" + crossws "^0.2.0" + defu "^6.1.4" + get-port-please "^3.1.2" + h3 "^1.10.2" + http-shutdown "^1.2.2" + jiti "^1.21.0" + mlly "^1.6.1" + node-forge "^1.3.1" + pathe "^1.1.2" + std-env "^3.7.0" + ufo "^1.4.0" + untun "^0.1.3" + uqr "^0.1.2" + listr2@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" @@ -11692,6 +12225,11 @@ lru-cache@4.1.x: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -11903,6 +12441,11 @@ mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -12077,6 +12620,16 @@ mlly@^1.2.0, mlly@^1.4.0: pkg-types "^1.0.3" ufo "^1.1.2" +mlly@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.0.tgz#587383ae40dda23cadb11c3c3cc972b277724271" + integrity sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.1.0" + ufo "^1.5.3" + mnemonist@0.39.5: version "0.39.5" resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.39.5.tgz#5850d9b30d1b2bc57cc8787e5caa40f6c3420477" @@ -12122,6 +12675,11 @@ motion@10.16.2: "@motionone/utils" "^10.15.1" "@motionone/vue" "^10.16.2" +mri@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + mrmime@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" @@ -12215,6 +12773,11 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +napi-wasm@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" + integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -12253,11 +12816,26 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" + integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== + +node-addon-api@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb" + integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== + node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== +node-fetch-native@^1.6.1, node-fetch-native@^1.6.2, node-fetch-native@^1.6.3: + version "1.6.4" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" + integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== + node-fetch@2.6.7, node-fetch@^2.6.7, node-fetch@^2.x.x: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -12274,7 +12852,7 @@ node-fetch@3.3.1: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -node-fetch@^2.7.0: +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -12339,6 +12917,11 @@ node-notifier@10.0.1: uuid "^8.3.2" which "^2.0.2" +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + node-releases@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" @@ -12430,6 +13013,15 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== +obj-multiplex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/obj-multiplex/-/obj-multiplex-1.0.0.tgz#2f2ae6bfd4ae11befe742ea9ea5b36636eabffc1" + integrity sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA== + dependencies: + end-of-stream "^1.4.0" + once "^1.4.0" + readable-stream "^2.3.3" + object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -12543,6 +13135,20 @@ obliterator@^2.0.1: resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== +ofetch@^1.3.3: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" + integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== + dependencies: + destr "^2.0.3" + node-fetch-native "^1.6.3" + ufo "^1.5.3" + +ohash@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" + integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + omggif@^1.0.10, omggif@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" @@ -12579,7 +13185,7 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -open@8.4.2: +open@8.4.2, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -13011,6 +13617,11 @@ pathe@^1.1.0, pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -13164,6 +13775,15 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" +pkg-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.0.tgz#3ec1bf33379030fd0a34c227b6c650e8ea7ca271" + integrity sha512-/RpmvKdxKf8uILTtoOhAgf30wYbP2Qw+L9p3Rvshx1JZVX+XQNZQFjlbmGHEGIm4CkVPlSn+NXmIM8+9oWQaSA== + dependencies: + confbox "^0.1.7" + mlly "^1.6.1" + pathe "^1.1.2" + pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -13181,6 +13801,11 @@ pngjs@^5.0.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== +pony-cause@^2.1.10: + version "2.1.11" + resolved "https://registry.yarnpkg.com/pony-cause/-/pony-cause-2.1.11.tgz#d69a20aaccdb3bdb8f74dd59e5c68d8e6772e4bd" + integrity sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg== + postcss-load-config@^3.1.0: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" @@ -13239,15 +13864,10 @@ postcss@8.4.21, postcss@8.4.31, postcss@^8.3.6, postcss@^8.4.27, postcss@^8.4.7: picocolors "^1.0.0" source-map-js "^1.0.2" -preact@^10.12.0: - version "10.16.0" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.16.0.tgz#68a06d70b191b8a313ea722d61e09c6b2a79a37e" - integrity sha512-XTSj3dJ4roKIC93pald6rWuB2qQJO9gO2iLLyTe87MrjQN+HklueLsmskbywEWqCHlclgz3/M4YLL2iBr9UmMA== - -preact@^10.5.9: - version "10.11.1" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.11.1.tgz#35fdad092de8b2ad29df3a0bef9af1f4fdd2256b" - integrity sha512-1Wz5PCRm6Fg+6BTXWJHhX4wRK9MZbZBHuwBqfZlOdVm2NqPe8/rjYpufvYCwJSGb9layyzB2jTTXfpCTynLqFQ== +preact@^10.16.0: + version "10.21.0" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.21.0.tgz#5b0335c873a1724deb66e517830db4fd310c24f6" + integrity sha512-aQAIxtzWEwH8ou+OovWVSVNlFImL7xUCwJX3YMqA3U8iKCNC34999fFOnWjYNsylgfPgMexpbk7WYOLtKr/mxg== prelude-ls@^1.2.1: version "1.2.1" @@ -13460,6 +14080,23 @@ pvutils@^1.1.3: resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== +qr-code-styling@^1.6.0-rc.1: + version "1.6.0-rc.1" + resolved "https://registry.yarnpkg.com/qr-code-styling/-/qr-code-styling-1.6.0-rc.1.tgz#6c89e185fa50cc9135101085c12ae95b06f1b290" + integrity sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q== + dependencies: + qrcode-generator "^1.4.3" + +qrcode-generator@^1.4.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.4.tgz#63f771224854759329a99048806a53ed278740e7" + integrity sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw== + +qrcode-terminal-nooctal@^0.12.1: + version "0.12.1" + resolved "https://registry.yarnpkg.com/qrcode-terminal-nooctal/-/qrcode-terminal-nooctal-0.12.1.tgz#45016aca0d82b2818de7af0a06d072ad671fbe2e" + integrity sha512-jy/kkD0iIMDjTucB+5T6KBsnirlhegDH47vHgrj5MejchSQmi/EAMM0xMFeePgV9CJkkAapNakpVUWYgHvtdKg== + qrcode@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.1.tgz#0103f97317409f7bc91772ef30793a54cd59f0cb" @@ -13470,7 +14107,7 @@ qrcode@1.5.1: pngjs "^5.0.0" yargs "^15.3.1" -qrcode@1.5.3, qrcode@^1.5.1: +qrcode@1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170" integrity sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg== @@ -13480,13 +14117,6 @@ qrcode@1.5.3, qrcode@^1.5.1: pngjs "^5.0.0" yargs "^15.3.1" -qs@^6.10.3: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -13502,16 +14132,6 @@ query-string@7.1.3: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -query-string@^6.13.5: - version "6.14.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" - integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== - dependencies: - decode-uri-component "^0.2.0" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - querystring-es3@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -13554,6 +14174,11 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== +radix3@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" + integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA== + raf-schd@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a" @@ -13630,6 +14255,14 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +react-native-webview@^11.26.0: + version "11.26.1" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.26.1.tgz#658c09ed5162dc170b361e48c2dd26c9712879da" + integrity sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw== + dependencies: + escape-string-regexp "2.0.0" + invariant "2.2.4" + react-redux@^7.2.0: version "7.2.9" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" @@ -13761,6 +14394,30 @@ readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^2.3.3: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +"readable-stream@^3.6.2 || ^4.4.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readable-stream@^4.0.0: version "4.4.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.4.2.tgz#e6aced27ad3b9d726d8308515b9a1b98dc1b9d13" @@ -14067,6 +14724,16 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-visualizer@^5.9.2: + version "5.12.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.12.0.tgz#661542191ce78ee4f378995297260d0c1efb1302" + integrity sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ== + dependencies: + open "^8.4.0" + picomatch "^2.3.1" + source-map "^0.7.4" + yargs "^17.5.1" + rollup@^3.27.1: version "3.29.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.3.tgz#97769774ccaa6a3059083d4680fcabd8ead01289" @@ -14106,13 +14773,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^6.6.3: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - rxjs@^7.5.5: version "7.5.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39" @@ -14152,11 +14812,6 @@ safe-json-stringify@~1: resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd" integrity sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg== -safe-json-utils@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/safe-json-utils/-/safe-json-utils-1.1.1.tgz#0e883874467d95ab914c3f511096b89bfb3e63b1" - integrity sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ== - safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -14197,7 +14852,7 @@ schema-utils@^3.0.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^3.1.0: +schema-utils@^3.1.0, schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -14221,6 +14876,15 @@ scrypt-js@3.0.1: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== +secp256k1@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-5.0.0.tgz#be6f0c8c7722e2481e9773336d351de8cddd12f7" + integrity sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^5.0.0" + node-gyp-build "^4.2.0" + selenium-webdriver@4.10.0: version "4.10.0" resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.10.0.tgz#0508cdfbb5ad8470d8fd19db1a69d3e87f474b79" @@ -14413,6 +15077,11 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967" integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -14483,7 +15152,17 @@ socket.io-client@4.5.3: engine.io-client "~6.2.3" socket.io-parser "~4.2.0" -socket.io-parser@4.2.3, socket.io-parser@~4.2.0: +socket.io-client@^4.5.1: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.5.tgz#919be76916989758bdc20eec63f7ee0ae45c05b7" + integrity sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.5.2" + socket.io-parser "~4.2.4" + +socket.io-parser@4.2.3, socket.io-parser@~4.2.0, socket.io-parser@~4.2.4: version "4.2.3" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.3.tgz#926bcc6658e2ae0883dc9dee69acbdc76e4e3667" integrity sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ== @@ -14553,7 +15232,7 @@ source-map@0.5.x, source-map@~0.5.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== -source-map@0.7.4, source-map@^0.7.3: +source-map@0.7.4, source-map@^0.7.3, source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== @@ -14649,6 +15328,11 @@ std-env@^3.3.3: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.3.tgz#a54f06eb245fdcfef53d56f3c0251f1d5c3d01fe" integrity sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg== +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + stream-browserify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" @@ -14987,6 +15671,11 @@ syntax-error@^1.1.1: dependencies: acorn-node "^1.2.0" +system-architecture@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" + integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== + tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -15030,6 +15719,17 @@ tcp-port-used@^1.0.2: debug "4.3.1" is2 "^2.0.6" +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + terser-webpack-plugin@^5.3.7: version "5.3.9" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" @@ -15061,6 +15761,16 @@ terser@^5.16.8: commander "^2.20.0" source-map-support "~0.5.20" +terser@^5.26.0: + version "5.31.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" + integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -15206,11 +15916,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toggle-selection@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" - integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== - tosource@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/tosource/-/tosource-1.0.0.tgz#42d88dd116618bcf00d6106dd5446f3427902ff1" @@ -15281,7 +15986,7 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.14.1, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -15411,7 +16116,7 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typedarray-to-buffer@3.1.5, typedarray-to-buffer@^3.1.5: +typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== @@ -15433,6 +16138,11 @@ ufo@^1.1.2: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.1.2.tgz#d0d9e0fa09dece0c31ffd57bd363f030a35cfe76" integrity sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ== +ufo@^1.4.0, ufo@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" @@ -15460,6 +16170,11 @@ unc-path-regex@^0.1.2: resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== +uncrypto@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" + integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== + undeclared-identifiers@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz#9254c1d37bdac0ac2b52de4b6722792d2a91e30f" @@ -15484,6 +16199,22 @@ underscore@1.12.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== +unenv@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== + dependencies: + consola "^3.2.3" + defu "^6.1.3" + mime "^3.0.0" + node-fetch-native "^1.6.1" + pathe "^1.1.1" + +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + unique-filename@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" @@ -15525,11 +16256,36 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +unstorage@^1.9.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" + integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + dependencies: + anymatch "^3.1.3" + chokidar "^3.6.0" + destr "^2.0.3" + h3 "^1.11.1" + listhen "^1.7.2" + lru-cache "^10.2.0" + mri "^1.2.0" + node-fetch-native "^1.6.2" + ofetch "^1.3.3" + ufo "^1.4.0" + untildify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== +untun@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6" + integrity sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ== + dependencies: + citty "^0.1.5" + consola "^3.2.3" + pathe "^1.1.1" + unzipper@^0.10.14: version "0.10.14" resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.14.tgz#d2b33c977714da0fbc0f82774ad35470a7c962b1" @@ -15551,6 +16307,14 @@ upath@2.0.1: resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== +update-browserslist-db@^1.0.13: + version "1.0.15" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz#60ed9f8cba4a728b7ecf7356f641a31e3a691d97" + integrity sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.0" + update-browserslist-db@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" @@ -15579,6 +16343,11 @@ update-notifier@6.0.2: semver-diff "^4.0.0" xdg-basedir "^5.1.0" +uqr@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" + integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -15627,7 +16396,7 @@ use-sidecar@^1.1.2: detect-node-es "^1.1.0" tslib "^2.0.0" -use-sync-external-store@1.2.0, use-sync-external-store@^1.2.0: +use-sync-external-store@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== @@ -15647,6 +16416,13 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" +utf-8-validate@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-6.0.3.tgz#7d8c936d854e86b24d1d655f138ee27d2636d777" + integrity sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA== + dependencies: + node-gyp-build "^4.3.0" + utif@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/utif/-/utif-2.0.1.tgz#9e1582d9bbd20011a6588548ed3266298e711759" @@ -15697,6 +16473,11 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + v8-to-istanbul@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" @@ -15735,7 +16516,7 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -viem@1.21.4, viem@^1.1.4: +viem@1.21.4, viem@^1.0.0, viem@^1.1.4: version "1.21.4" resolved "https://registry.yarnpkg.com/viem/-/viem-1.21.4.tgz#883760e9222540a5a7e0339809202b45fe6a842d" integrity sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ== @@ -15749,6 +16530,20 @@ viem@1.21.4, viem@^1.1.4: isows "1.0.3" ws "8.13.0" +viem@2.10.1: + version "2.10.1" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.10.1.tgz#0dffc8e4c7a03dd06de098931b3666b68a040964" + integrity sha512-sfbcFdzlMHSZI+4RpqidxOqPu6xwWtmqDBWSVml2XV+n21dgQFmVRN0nHhZoyMDSo4mTSKtWwW9sHHu9vUF2mw== + dependencies: + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@scure/bip32" "1.3.2" + "@scure/bip39" "1.2.1" + abitype "1.0.0" + isows "1.0.3" + ws "8.13.0" + vite-node@0.34.6: version "0.34.6" resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.6.tgz#34d19795de1498562bf21541a58edcd106328a17" @@ -15807,17 +16602,14 @@ vm-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -wagmi@0.12.19: - version "0.12.19" - resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.19.tgz#5f5038330907f70c033ea51ef8a9136289567256" - integrity sha512-S/el9BDb/HNeQWh1v8TvntMPX/CgKLDAoJqDb8i7jifLfWPqFL7gor3vnI1Vs6ZlB8uh7m+K1Qyg+mKhbITuDQ== +wagmi@2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.8.1.tgz#acd37c917ea31018f8de823c7b81c1a8db3ca9de" + integrity sha512-ekd9JHryGelHf9qcoZUDomCF4xDjYXjQ7EO+e9oCg89/i49Pr5CfmzgXfHbusyewhuzRAMWT5Db2oTBWRkqHwQ== dependencies: - "@tanstack/query-sync-storage-persister" "^4.27.1" - "@tanstack/react-query" "^4.28.0" - "@tanstack/react-query-persist-client" "^4.28.0" - "@wagmi/core" "0.10.17" - abitype "^0.3.0" - use-sync-external-store "^1.2.0" + "@wagmi/connectors" "4.3.3" + "@wagmi/core" "2.9.1" + use-sync-external-store "1.2.0" walker@^1.0.8: version "1.0.8" @@ -15834,6 +16626,14 @@ watchpack@2.4.0, watchpack@^2.4.0: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" +watchpack@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" @@ -15904,6 +16704,19 @@ webcrypto-core@^1.7.4: pvtsutils "^1.3.2" tslib "^2.4.0" +"webextension-polyfill@>=0.10.0 <1.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.11.0.tgz#1640c0d27192424fd5b420237acbe453f88c8246" + integrity sha512-YUBSKQA0iCx2YtM75VFgvvcx1hLKaGGiph6a6UaUdSgk32VT9SzrcDAKBjeGHXoAZTnNBqS5skA4VfoKMXhEBA== + dependencies: + webpack "^5.91.0" + webpack-cli "^5.1.4" + +webextension-polyfill@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#ccb28101c910ba8cf955f7e6a263e662d744dbb8" + integrity sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g== + webextension-polyfill@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.5.0.tgz#795e0bf6a2b8eadcdb6edaecd169e9228c747519" @@ -15935,7 +16748,7 @@ webpack-bundle-analyzer@4.8.0: sirv "^1.0.7" ws "^7.3.1" -webpack-cli@5.1.4: +webpack-cli@5.1.4, webpack-cli@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== @@ -16019,6 +16832,36 @@ webpack@5.79.0: watchpack "^2.4.0" webpack-sources "^3.2.3" +webpack@^5.91.0: + version "5.91.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.16.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -16261,6 +17104,11 @@ ws@^8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.9.0.tgz#2a994bb67144be1b53fe2d23c53c028adeb7f45e" integrity sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + ws@~8.2.3: version "8.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" @@ -16373,7 +17221,7 @@ yargs@17.7.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yargs@17.7.2: +yargs@17.7.2, yargs@^17.5.1: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -16467,9 +17315,9 @@ zustand@4.1.5: dependencies: use-sync-external-store "1.2.0" -zustand@^4.3.1: - version "4.3.9" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.9.tgz#a7d4332bbd75dfd25c6848180b3df1407217f2ad" - integrity sha512-Tat5r8jOMG1Vcsj8uldMyqYKC5IZvQif8zetmLHs9WoZlntTHmIoNM8TpLRY31ExncuUvUOXehd0kvahkuHjDw== +zustand@4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.1.tgz#0cd3a3e4756f21811bd956418fdc686877e8b3b0" + integrity sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw== dependencies: use-sync-external-store "1.2.0"