From f53076dfdcfd6a8265607fc75b934c8d2b4cd546 Mon Sep 17 00:00:00 2001 From: CodeDragonVN <150457827+CodeDragonVN@users.noreply.github.com> Date: Mon, 4 Mar 2024 20:09:23 +0000 Subject: [PATCH] fix: update balance display on wallet connect --- .../src/components/TokenDropdown/TokenDropdown.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte b/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte index 47c8d4e71f6..24d865ad5a1 100644 --- a/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte +++ b/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte @@ -136,7 +136,7 @@ destChainId = $destNetwork?.id, ) { const token = value; - if (!token || !srcChainId || !destChainId || !userAddress) return; + if (!token || !srcChainId || !userAddress) return; $computingBalance = true; $errorComputingBalance = false; @@ -175,7 +175,7 @@ const onNetworkChange = () => { const srcChain = $connectedSourceChain; const destChain = $destNetwork; - if (srcChain && destChain) updateBalance($account?.address, srcChain.id, destChain.id); + if (srcChain) updateBalance($account?.address, srcChain.id, destChain ? destChain.id : undefined); }; const onAccountChange = (newAccount: Account, prevAccount?: Account) => {