Skip to content

Commit

Permalink
Removed unnecessary toString on altered balance column.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Sep 30, 2023
1 parent a224db0 commit c1d0cd0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/data/formulas/wallet/bank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ export const balance: WalletFormula<string | undefined, { denom: string }> = {
throw new Error('missing `denom`')
}

return (await getBalance(walletAddress, denom))?.toString()
return await getBalance(walletAddress, denom)
},
}

export const balances: WalletFormula<Record<string, string>> = {
compute: async ({ walletAddress, getBalances }) =>
Object.entries((await getBalances(walletAddress)) || {}).reduce(
(acc, [denom, balance]) => ({
...acc,
[denom]: balance.toString(),
}),
{} as Record<string, string>
),
(await getBalances(walletAddress)) || {},
}

0 comments on commit c1d0cd0

Please sign in to comment.