diff --git a/apps/mvp/src/components/ConnectWalletsFlow.vue b/apps/mvp/src/components/ConnectWalletsFlow.vue index 5a554081c..827190376 100644 --- a/apps/mvp/src/components/ConnectWalletsFlow.vue +++ b/apps/mvp/src/components/ConnectWalletsFlow.vue @@ -10,7 +10,7 @@ import useLedger from "@/composables/ledger" import useTrezor from "@/composables/trezor" import useUser from "@/composables/user" import useWallets from "@/composables/wallets" -import useWalletConnect from "@/composables/walletConnectV2" +import useWalletConnect from "@/composables/walletConnect" // import useWallets from '@/composables/wallets' type UserAuthFlowState = @@ -40,7 +40,7 @@ const { getEthersLedgerAddresses } = useLedger() const { getEthersTrezorAddresses } = useTrezor() const { user } = useUser() const { detectActiveNetwork, switchEthersNetwork } = useWallets() -const { connectWalletConnectV2 } = useWalletConnect() +const { connectWalletConnect, walletConnectSelectedAccount } = useWalletConnect() // const { installedWallets, detectInstalledWalletProviders } = useWallets() // eslint-disable-next-line no-undef @@ -164,7 +164,7 @@ async function selectProvider(provider: ProviderString): Promise { if (provider === "WalletConnect") { // TODO: @@cali1 - pass in the network id dynamically - walletProviderAddresses.value = await connectWalletConnectV2(requiredNetwork) as CryptoAddress[] + walletProviderAddresses.value = await connectWalletConnect(requiredNetwork) as CryptoAddress[] } else if (browserProvidersList.includes(provider)) { walletProviderAddresses.value = await getEthersAddressesWithBalances(provider) as CryptoAddress[] } else if (provider === "Ledger") { @@ -226,6 +226,12 @@ onUnmounted(() => { flowState.value = "select_provider" } }) + +watch(walletConnectSelectedAccount, () => { + if (selectedProvider.value === "WalletConnect") { + walletProviderAddresses.value = walletConnectSelectedAccount.value as CryptoAddress[] + } +})