From 0977b5993759ab5038df6750164b382642b75008 Mon Sep 17 00:00:00 2001 From: Jordan Frankfurt Date: Fri, 4 Aug 2023 12:19:02 -0500 Subject: [PATCH] Update packages/walletconnect-v2/src/index.ts Co-authored-by: Zach Pomerantz --- packages/walletconnect-v2/src/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/walletconnect-v2/src/index.ts b/packages/walletconnect-v2/src/index.ts index 7dbb0969b..11a5732c6 100644 --- a/packages/walletconnect-v2/src/index.ts +++ b/packages/walletconnect-v2/src/index.ts @@ -114,14 +114,13 @@ export class WalletConnect extends Connector { private async initializeProvider( desiredChainId: number | undefined = this.defaultChainId ): Promise { - const ethProviderModule = await import('@walletconnect/ethereum-provider') - const rpcMap = this.rpcMap ? await getBestUrlMap(this.rpcMap, this.timeout) : undefined + const rpcMap = this.rpcMap ? getBestUrlMap(this.rpcMap, this.timeout) : undefined const chainProps = this.getChainProps(this.chains, this.optionalChains, desiredChainId) - this.provider = await ethProviderModule.default.init({ + this.provider = (await import('@walletconnect/ethereum-provider')).default.init({ ...this.options, ...chainProps, - rpcMap, + rpcMap: await rpcMap, }) return this.handleProviderEvents(this.provider)