From 132ba138d25f26d3d255e4d9e2f63a72a9750422 Mon Sep 17 00:00:00 2001 From: dafuga Date: Mon, 23 Oct 2023 20:02:48 -0700 Subject: [PATCH] refactor: moving balances to balances store --- src/components/elements/input/token/selector.svelte | 1 - src/components/elements/input/token/selector/row.svelte | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/elements/input/token/selector.svelte b/src/components/elements/input/token/selector.svelte index 93ad247f..c9899402 100644 --- a/src/components/elements/input/token/selector.svelte +++ b/src/components/elements/input/token/selector.svelte @@ -45,7 +45,6 @@ $: { if (tokenOptions) { filteredTokens = tokenOptions.map(tokenOption => { - const usdt = $tokens?.find(token => token.contract === 'tethertether') const token = $tokens?.find(token => tokenOption.tokenName === token.name) if (!token) { diff --git a/src/components/elements/input/token/selector/row.svelte b/src/components/elements/input/token/selector/row.svelte index 3d53ab4d..91f00355 100644 --- a/src/components/elements/input/token/selector/row.svelte +++ b/src/components/elements/input/token/selector/row.svelte @@ -14,12 +14,7 @@ let balance $: { - if (token.balance) { - balance = token.balance - } else { - balance = - $balances && $balances.find((balance) => balance.tokenKey === token.key)?.quantity - } + balance = $balances && $balances.find((balance) => balance.tokenKey === token.key)?.quantity if (typeof balance === 'string') { formattedTokenBalance = balance