Skip to content

Commit b5b354b

Browse files
committed
docs: add note about placement of user balance filtering
1 parent 6b658fb commit b5b354b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/web3/hooks/useUserBankValues.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export function useUserBankValues(): TokenCoin[] {
2222

2323
const allTokens = useTokens();
2424
const selectedTokens = useMemo<Token[]>(() => {
25+
// note: this could be better: we are just finding the first match in the chain registry
26+
// with that denom, but really it needs to check for chain id too
27+
// ibc tokens will need to be checked here too
28+
// this should probably live in the indexerData as we'll always want the filtered balances
2529
return (balances || []).reduce<Token[]>((result, balance) => {
2630
const token = allTokens.find(matchTokenDenom(balance.denom));
2731
if (token) {

0 commit comments

Comments
 (0)