Skip to content

Commit

Permalink
normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Jun 4, 2024
1 parent d2a1c9e commit 6cf3360
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/lib/queries/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ export function cosmosBalancesQuery({
`${restUrl}/cosmos/bank/v1beta1/balances/${address}`,
)
if (!response.ok) return []
const result = await response.json()
return result.balances
return (await response.json()).balances.map((x) => {
return {
address: x.denom,
symbol: x.denom,
balance: x.amount,
decimals: 0
}
})
}
})
}

0 comments on commit 6cf3360

Please sign in to comment.