Skip to content

Commit

Permalink
refactor: moving balances to balances store
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 24, 2023
1 parent 6f921fa commit 132ba13
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/components/elements/input/token/selector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 1 addition & 6 deletions src/components/elements/input/token/selector/row.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 132ba13

Please sign in to comment.