From 4d4180dfb382480b4839a05ec10b9f07379cd205 Mon Sep 17 00:00:00 2001 From: Jordan Frankfurt Date: Thu, 10 Aug 2023 12:56:30 -0500 Subject: [PATCH] fix: upgrades `@walletconnect/ethereum-provider` and `@walletconnect/modal` (#868) * fix: update wcv2 to remove polyfills, fix crypto.decode errors, allow empty required chains, improve deep link ux * update to newer package version * enforce new rules on optional/required chains parameters * fix test types * fix defaultChainId * remove unnecessary changes * assign this.provider * fiddle with tests * add test for optional chains config * pr review * refactor to validate chainProps on init * Update packages/walletconnect-v2/src/index.ts Co-authored-by: Zach Pomerantz * Update packages/walletconnect-v2/src/index.ts Co-authored-by: Zach Pomerantz * Update packages/walletconnect-v2/src/index.ts Co-authored-by: Zach Pomerantz * Update packages/walletconnect-v2/src/index.ts Co-authored-by: Zach Pomerantz * pr review --------- Co-authored-by: Zach Pomerantz --- example/components/ConnectWithSelect.tsx | 8 +- example/pages/index.tsx | 2 - packages/walletconnect-v2/package.json | 4 +- packages/walletconnect-v2/src/index.spec.ts | 32 +++-- packages/walletconnect-v2/src/index.ts | 85 ++++++++--- packages/walletconnect-v2/src/utils.ts | 22 ++- yarn.lock | 151 ++++++++++---------- 7 files changed, 184 insertions(+), 120 deletions(-) diff --git a/example/components/ConnectWithSelect.tsx b/example/components/ConnectWithSelect.tsx index d113140..3568c65 100644 --- a/example/components/ConnectWithSelect.tsx +++ b/example/components/ConnectWithSelect.tsx @@ -26,14 +26,12 @@ function ChainSelect({ }} disabled={switchChain === undefined} > - - + {chainIds.map((chainId) => ( - ))} diff --git a/example/pages/index.tsx b/example/pages/index.tsx index 56ca0cb..baefa90 100644 --- a/example/pages/index.tsx +++ b/example/pages/index.tsx @@ -2,7 +2,6 @@ import CoinbaseWalletCard from '../components/connectorCards/CoinbaseWalletCard' import GnosisSafeCard from '../components/connectorCards/GnosisSafeCard' import MetaMaskCard from '../components/connectorCards/MetaMaskCard' import NetworkCard from '../components/connectorCards/NetworkCard' -import WalletConnectCard from '../components/connectorCards/WalletConnectCard' import WalletConnectV2Card from '../components/connectorCards/WalletConnectV2Card' import ProviderExample from '../components/ProviderExample' @@ -13,7 +12,6 @@ export default function Home() {
- diff --git a/packages/walletconnect-v2/package.json b/packages/walletconnect-v2/package.json index 9aa3f03..db2bd38 100644 --- a/packages/walletconnect-v2/package.json +++ b/packages/walletconnect-v2/package.json @@ -24,8 +24,8 @@ "start": "tsc --watch" }, "dependencies": { - "@walletconnect/ethereum-provider": "^2.8.6", - "@walletconnect/modal": "^2.5.9", + "@walletconnect/ethereum-provider": "^2.9.2", + "@walletconnect/modal": "^2.6.1", "@web3-react/types": "^8.2.0", "eventemitter3": "^4.0.7" }, diff --git a/packages/walletconnect-v2/src/index.spec.ts b/packages/walletconnect-v2/src/index.spec.ts index 50a4eae..b318bb0 100644 --- a/packages/walletconnect-v2/src/index.spec.ts +++ b/packages/walletconnect-v2/src/index.spec.ts @@ -40,7 +40,11 @@ class MockWalletConnectProvider extends MockEIP1193Provider { constructor(opts: EthereumProviderOptions) { super() - this.chainId = opts.chains[0] + if (opts.chains && opts.chains.length > 0) { + this.chainId = opts.chains[0] + } else if (opts.optionalChains && opts.optionalChains.length > 0) { + this.chainId = opts.optionalChains[0] + } this.opts = opts } @@ -68,7 +72,7 @@ class MockWalletConnectProvider extends MockEIP1193Provider { * We mock this method later in the test suite to test behavior when optional chains are not supported. */ public getConnectedChains() { - return this.opts.chains.concat(this.opts.optionalChains || []) + return (this.opts.chains || []).concat(this.opts.optionalChains || []) } // session is an object when connected, undefined otherwise @@ -91,21 +95,17 @@ class MockWalletConnectProvider extends MockEIP1193Provider { } describe('WalletConnect', () => { - let wc2InitMock: jest.Mock + let wc2InitMock: jest.SpyInstance, Parameters>; beforeEach(() => { /* * TypeScript error is expected here. We're mocking a factory `init` method * to only define a subset of `EthereumProvider` that we use internally */ - // @ts-ignore wc2InitMock = jest .spyOn(EthereumProvider, 'init') - // @ts-ignore - .mockImplementation(async (opts) => { - const provider = new MockWalletConnectProvider(opts) - return provider - }) + // @ts-expect-error + .mockImplementation((opts) => Promise.resolve(new MockWalletConnectProvider(opts))) }) describe('#connectEagerly', () => { @@ -121,6 +121,14 @@ describe('WalletConnect', () => { connector.activate() connector.activate() expect(wc2InitMock).toHaveBeenCalledTimes(1) + wc2InitMock.mockClear() + }) + test('should be able to initialize with only optionalChains', async () => { + const { connector } = createTestEnvironment({ chains: undefined, optionalChains: chains }) + connector.activate() + connector.activate() + expect(wc2InitMock).toHaveBeenCalledTimes(1) + wc2InitMock.mockClear() }) }) @@ -148,11 +156,11 @@ describe('WalletConnect', () => { await expect(connector.activate(99)).rejects.toThrow() }) - test('should throw an error when using optional chain as default', async () => { - const { connector } = createTestEnvironment({ chains, optionalChains: [8] }, 8) - await expect(connector.activate()).rejects.toThrow() + test('should throw an error when using optional chain as default', () => { + expect(() => createTestEnvironment({ chains, optionalChains: [8] }, 8)).toThrow('Invalid chainId 8. Make sure default chain is included in "chains" - chains specified in "optionalChains" may not be selected as the default, as they may not be supported by the wallet.') }) + test('should switch to an optional chain', async () => { const { connector, store } = createTestEnvironment({ chains, diff --git a/packages/walletconnect-v2/src/index.ts b/packages/walletconnect-v2/src/index.ts index 1b1672c..c35a9f2 100644 --- a/packages/walletconnect-v2/src/index.ts +++ b/packages/walletconnect-v2/src/index.ts @@ -3,7 +3,7 @@ import type { Actions, ProviderRpcError } from '@web3-react/types' import { Connector } from '@web3-react/types' import EventEmitter3 from 'eventemitter3' -import { getBestUrlMap, getChainsWithDefault } from './utils' +import { ArrayOneOrMore, getBestUrlMap, getChainsWithDefault, isArrayOneOrMore } from './utils' export const URI_AVAILABLE = 'URI_AVAILABLE' const DEFAULT_TIMEOUT = 5000 @@ -23,6 +23,19 @@ export type WalletConnectOptions = Omit + optionalChains?: number[] + } + | { + chains?: number[] + optionalChains: ArrayOneOrMore + } + /** * Options to configure the WalletConnect connector. */ @@ -51,22 +64,26 @@ export class WalletConnect extends Connector { private readonly options: Omit private readonly rpcMap?: Record - private readonly chains: number[] + private readonly chains: number[] | ArrayOneOrMore | undefined + private readonly optionalChains: number[] | ArrayOneOrMore | undefined private readonly defaultChainId?: number private readonly timeout: number private eagerConnection?: Promise - constructor({ actions, options, defaultChainId, timeout = DEFAULT_TIMEOUT, onError }: WalletConnectConstructorArgs) { + constructor({ actions, defaultChainId, options, timeout = DEFAULT_TIMEOUT, onError }: WalletConnectConstructorArgs) { super(actions, onError) - const { rpcMap, rpc, chains, ...rest } = options + const { rpcMap, rpc, ...rest } = options this.options = rest - this.chains = chains this.defaultChainId = defaultChainId this.rpcMap = rpcMap || rpc this.timeout = timeout + + const { chains, optionalChains } = this.getChainProps(rest.chains, rest.optionalChains, defaultChainId) + this.chains = chains + this.optionalChains = optionalChains } private disconnectListener = (error: ProviderRpcError) => { @@ -86,27 +103,51 @@ export class WalletConnect extends Connector { this.events.emit(URI_AVAILABLE, uri) } + private async initializeProvider( + desiredChainId: number | undefined = this.defaultChainId + ): Promise { + const rpcMap = this.rpcMap ? getBestUrlMap(this.rpcMap, this.timeout) : undefined + const chainProps = this.getChainProps(this.chains, this.optionalChains, desiredChainId) + + const ethProviderModule = await import('@walletconnect/ethereum-provider') + this.provider = await ethProviderModule.default.init({ + ...this.options, + ...chainProps, + rpcMap: await rpcMap, + }) + + return this.provider + .on('disconnect', this.disconnectListener) + .on('chainChanged', this.chainChangedListener) + .on('accountsChanged', this.accountsChangedListener) + .on('display_uri', this.URIListener) + } + + private getChainProps( + chains: number[] | ArrayOneOrMore | undefined, + optionalChains: number[] | ArrayOneOrMore | undefined, + desiredChainId: number | undefined = this.defaultChainId + ): ChainsProps { + // Reorder chains and optionalChains if necessary + const orderedChains = getChainsWithDefault(chains, desiredChainId) + const orderedOptionalChains = getChainsWithDefault(optionalChains, desiredChainId) + + // Validate and return the result. + // Type discrimination requires that we use these typeguard checks to guarantee a valid return type. + if (isArrayOneOrMore(orderedChains)) { + return { chains: orderedChains, optionalChains: orderedOptionalChains } + } else if (isArrayOneOrMore(orderedOptionalChains)) { + return { chains: orderedChains, optionalChains: orderedOptionalChains } + } + + throw new Error('Either chains or optionalChains must have at least one item.') + } + private isomorphicInitialize( desiredChainId: number | undefined = this.defaultChainId ): Promise { if (this.eagerConnection) return this.eagerConnection - - const rpcMap = this.rpcMap ? getBestUrlMap(this.rpcMap, this.timeout) : undefined - const chains = desiredChainId ? getChainsWithDefault(this.chains, desiredChainId) : this.chains - - return (this.eagerConnection = import('@walletconnect/ethereum-provider').then(async (ethProviderModule) => { - const provider = (this.provider = await ethProviderModule.default.init({ - ...this.options, - chains, - rpcMap: await rpcMap, - })) - - return provider - .on('disconnect', this.disconnectListener) - .on('chainChanged', this.chainChangedListener) - .on('accountsChanged', this.accountsChangedListener) - .on('display_uri', this.URIListener) - })) + return (this.eagerConnection = this.initializeProvider(desiredChainId)) } /** {@inheritdoc Connector.connectEagerly} */ diff --git a/packages/walletconnect-v2/src/utils.ts b/packages/walletconnect-v2/src/utils.ts index 5e89633..ae555bc 100644 --- a/packages/walletconnect-v2/src/utils.ts +++ b/packages/walletconnect-v2/src/utils.ts @@ -1,3 +1,17 @@ +/** + * Necessary type to interface with @walletconnect/ethereum-provider@2.9.2 which is currently unexported + */ +export type ArrayOneOrMore = { + 0: T +} & Array + +/** + * This is a type guard for ArrayOneOrMore + */ +export function isArrayOneOrMore(input: T[] = []): input is ArrayOneOrMore { + return input.length > 0 +} + /** * @param rpcMap - Map of chainIds to rpc url(s). * @param timeout - Timeout, in milliseconds, after which to consider network calls failed. @@ -85,7 +99,13 @@ async function getBestUrl(urls: string | string[], timeout: number): Promise | undefined, + defaultChainId: number | undefined +) { + if (!chains || !defaultChainId || chains.length === 0) { + return chains + } const idx = chains.indexOf(defaultChainId) if (idx === -1) { throw new Error( diff --git a/yarn.lock b/yarn.lock index 413b1af..71d8f67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2730,24 +2730,24 @@ "@walletconnect/types" "^1.8.0" "@walletconnect/utils" "^1.8.0" -"@walletconnect/core@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.6.tgz#1db6acae36437dbe7357be7767f1faeda5d4ca6c" - integrity sha512-rnSqm1KJLcww/v6+UH8JeibQkJ3EKgyUDPfEK0stSEkrIUIcXaFlq3Et8S+vgV8bPhI0MVUhAhFL5OJZ3t2ryg== +"@walletconnect/core@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.2.tgz#c46734ca63771b28fd77606fd521930b7ecfc5e1" + integrity sha512-VARMPAx8sIgodeyngDHbealP3B621PQqjqKsByFUTOep8ZI1/R/20zU+cmq6j9RCrL+kLKZcrZqeVzs8Z7OlqQ== 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.11" + "@walletconnect/jsonrpc-ws-connection" "1.0.13" "@walletconnect/keyvaluestorage" "^1.0.2" "@walletconnect/logger" "^2.0.1" "@walletconnect/relay-api" "^1.0.9" "@walletconnect/relay-auth" "^1.0.4" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/types" "2.9.2" + "@walletconnect/utils" "2.9.2" events "^3.3.0" lodash.isequal "4.5.0" uint8arrays "^3.1.0" @@ -2803,19 +2803,19 @@ eip1193-provider "1.0.1" eventemitter3 "4.0.7" -"@walletconnect/ethereum-provider@^2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.6.tgz#c9321aa89ce0a5fdc6bacb562c63bb33de88f412" - integrity sha512-wUvJEsXTLmMihrOhQxAs1k9hrWEOT03QBn54P9r9GpJbJ1zEfIjQaXFfi8uup6gldhH+vN38PsbOiLyv/6d3qQ== +"@walletconnect/ethereum-provider@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.9.2.tgz#fb3a6fca279bb4e98e75baa2fb9730545d41bb99" + integrity sha512-eO1dkhZffV1g7vpG19XUJTw09M/bwGUwwhy1mJ3AOPbOSbMPvwiCuRz2Kbtm1g9B0Jv15Dl+TvJ9vTgYF8zoZg== 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.8.6" - "@walletconnect/types" "2.8.6" - "@walletconnect/universal-provider" "2.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/sign-client" "2.9.2" + "@walletconnect/types" "2.9.2" + "@walletconnect/universal-provider" "2.9.2" + "@walletconnect/utils" "2.9.2" events "^3.3.0" "@walletconnect/events@^1.0.1": @@ -2880,10 +2880,10 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz#1ce59d86f273d576ca73385961303ebd44dd923f" - integrity sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w== +"@walletconnect/jsonrpc-ws-connection@1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz#23b0cdd899801bfbb44a6556936ec2b93ef2adf4" + integrity sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg== dependencies: "@walletconnect/jsonrpc-utils" "^1.0.6" "@walletconnect/safe-json" "^1.0.2" @@ -2912,31 +2912,30 @@ resolved "https://registry.yarnpkg.com/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz#502cf8ab87330841d794819081e748ebdef7aee5" integrity sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw== -"@walletconnect/modal-core@2.5.9": - version "2.5.9" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.5.9.tgz#45e0c25320d42855aaac39e6ba256a84f972b871" - integrity sha512-isIebwF9hOknGouhS/Ob4YJ9Sa/tqNYG2v6Ua9EkCqIoLimepkG5eC53tslUWW29SLSfQ9qqBNG2+iE7yQXqgw== +"@walletconnect/modal-core@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.1.tgz#bc76055d0b644a2d4b98024324825c108a700905" + integrity sha512-f2hYlJ5pwzGvjyaZ6BoGR5uiMgXzWXt6w6ktt1N8lmY6PiYp8whZgqx2hTxVWwVlsGnaIfh6UHp1hGnANx0eTQ== dependencies: - buffer "6.0.3" - valtio "1.10.6" + valtio "1.11.0" -"@walletconnect/modal-ui@2.5.9": - version "2.5.9" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.9.tgz#4d07f1697147ec9f75d85d93f564cadae05a5e59" - integrity sha512-nfBaAT9Ls7RZTBBgAq+Nt/3AoUcinIJ9bcq5UHXTV3lOPu/qCKmUC/0HY3GvUK8ykabUAsjr0OAGmcqkB91qug== +"@walletconnect/modal-ui@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.1.tgz#200c54c8dfe3c71321abb2724e18bb357dfd6371" + integrity sha512-RFUOwDAMijSK8B7W3+KoLKaa1l+KEUG0LCrtHqaB0H0cLnhEGdLR+kdTdygw+W8+yYZbkM5tXBm7MlFbcuyitA== dependencies: - "@walletconnect/modal-core" "2.5.9" - lit "2.7.5" + "@walletconnect/modal-core" "2.6.1" + lit "2.7.6" motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@^2.5.9": - version "2.5.9" - resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.9.tgz#28840f2a46bcd0a47c5fda60d18a5f1607a92a72" - integrity sha512-Zs2RvPwbBNRdBhb50FuJCxi3FJltt1KSpI7odjU/x9GTpTOcSOkmR66PBCy2JvNA0+ztnS1Xs0LVEr3lu7/Jzw== +"@walletconnect/modal@^2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.1.tgz#066fdbfcff83b58c8a9da66ab4af0eb93e3626de" + integrity sha512-G84tSzdPKAFk1zimgV7JzIUFT5olZUVtI3GcOk77OeLYjlMfnDT23RVRHm5EyCrjkptnvpD0wQScXePOFd2Xcw== dependencies: - "@walletconnect/modal-core" "2.5.9" - "@walletconnect/modal-ui" "2.5.9" + "@walletconnect/modal-core" "2.6.1" + "@walletconnect/modal-ui" "2.6.1" "@walletconnect/qrcode-modal@^1.8.0": version "1.8.0" @@ -2992,19 +2991,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.6.tgz#7c83fa769d0403efd05172c72bd6b5f678e67a69" - integrity sha512-rOFTKTHP7oJfXgYHX7+SdB8VbcsEE3ZFG/bMdmZboWaBim1mrY3vUyDdKrNr0VgI3AwBiEQezQDfKxBX0pMSQQ== +"@walletconnect/sign-client@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.2.tgz#ff4c81c082c2078878367d07f24bcb20b1f7ab9e" + integrity sha512-anRwnXKlR08lYllFMEarS01hp1gr6Q9XUgvacr749hoaC/AwGVlxYFdM8+MyYr3ozlA+2i599kjbK/mAebqdXg== dependencies: - "@walletconnect/core" "2.8.6" + "@walletconnect/core" "2.9.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.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/types" "2.9.2" + "@walletconnect/utils" "2.9.2" events "^3.3.0" "@walletconnect/signer-connection@^1.8.0": @@ -3035,10 +3034,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.6.tgz#71426144db3fa693170a95f89f5d6e594ab2d901" - integrity sha512-Z/PFa3W1XdxeTcCtdR6lUsFgZfU/69wWJBPyclPwn7cu1+eriuCr6XZXQpJjib3flU+HnwHiXeUuqZaheehPxw== +"@walletconnect/types@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.2.tgz#d5fd5a61dc0f41cbdca59d1885b85207ac7bf8c5" + integrity sha512-7Rdn30amnJEEal4hk83cdwHUuxI1SWQ+K7fFFHBMqkuHLGi3tpMY6kpyfDxnUScYEZXqgRps4Jo5qQgnRqVM7A== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" @@ -3052,25 +3051,25 @@ resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.8.0.tgz#3f5e85b2d6b149337f727ab8a71b8471d8d9a195" integrity sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg== -"@walletconnect/universal-provider@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.6.tgz#f23640147f184c9a794a595db2d4f7b782ffdbfa" - integrity sha512-ln1RVv8+oHu9enOJ/oVkjiarneB+4vJCk16znOklIN2JtDHwB8iObDHlQH3UE6ynNTw1iRvaGuPR4g+YdIfB6w== +"@walletconnect/universal-provider@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.9.2.tgz#40e54e98bc48b1f2f5f77eb5b7f05462093a8506" + integrity sha512-JmaolkO8D31UdRaQCHwlr8uIFUI5BYhBzqYFt54Mc6gbIa1tijGOmdyr6YhhFO70LPmS6gHIjljwOuEllmlrxw== 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.8.6" - "@walletconnect/types" "2.8.6" - "@walletconnect/utils" "2.8.6" + "@walletconnect/sign-client" "2.9.2" + "@walletconnect/types" "2.9.2" + "@walletconnect/utils" "2.9.2" events "^3.3.0" -"@walletconnect/utils@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.6.tgz#8a4f6b19525e33822f8da1aa94c4eef21482eeda" - integrity sha512-wcy6e5+COYo7tfNnW8YqidnATdJDIW6vDiWWE7A1F78Sl/VflkaevB9cIgyn8eLdxC1SxXgGoeC2oLP90nnHJg== +"@walletconnect/utils@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.9.2.tgz#035bdb859ee81a4bcc6420f56114cc5ec3e30afb" + integrity sha512-D44hwXET/8JhhIjqljY6qxSu7xXnlPrf63UN/Qfl98vDjWlYVcDl2+JIQRxD9GPastw0S8XZXdRq59XDXLuZBg== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" @@ -3080,7 +3079,7 @@ "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.6" + "@walletconnect/types" "2.9.2" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" @@ -3727,14 +3726,6 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - buffer@^5.4.3, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -3743,6 +3734,14 @@ buffer@^5.4.3, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -7016,10 +7015,10 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" -lit@2.7.5: - version "2.7.5" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" - integrity sha512-i/cH7Ye6nBDUASMnfwcictBnsTN91+aBjXoTHF2xARghXScKxpD4F4WYI+VLXg9lqbMinDfvoI7VnZXjyHgdfQ== +lit@2.7.6: + version "2.7.6" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.6.tgz#810007b876ed43e0c70124de91831921598b1665" + integrity sha512-1amFHA7t4VaaDe+vdQejSVBklwtH9svGoG6/dZi9JhxtJBBlqY5D1RV7iLUYY0trCqQc4NfhYYZilZiVHt7Hxg== dependencies: "@lit/reactive-element" "^1.6.0" lit-element "^3.3.0" @@ -9717,10 +9716,10 @@ validate-npm-package-name@^4.0.0: dependencies: builtins "^5.0.0" -valtio@1.10.6: - version "1.10.6" - resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.10.6.tgz#80ed00198b949939863a0fa56ae687abb417fc4f" - integrity sha512-SxN1bHUmdhW6V8qsQTpCgJEwp7uHbntuH0S9cdLQtiohuevwBksbpXjwj5uDMA7bLwg1WKyq9sEpZrx3TIMrkA== +valtio@1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.0.tgz#c029dcd17a0f99d2fbec933721fe64cfd32a31ed" + integrity sha512-65Yd0yU5qs86b5lN1eu/nzcTgQ9/6YnD6iO+DDaDbQLn1Zv2w12Gwk43WkPlUBxk5wL/6cD5YMFf7kj6HZ1Kpg== dependencies: proxy-compare "2.5.1" use-sync-external-store "1.2.0"