Skip to content

Commit

Permalink
Merge pull request #570 from oasisprotocol/lw/token-supply
Browse files Browse the repository at this point in the history
Fix token supply formatting
  • Loading branch information
lukaw3d authored Jun 21, 2023
2 parents c841c05 + 08f69ca commit 6f622a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/570.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix token supply formatting
4 changes: 4 additions & 0 deletions src/oasis-indexer/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ export const useGetRuntimeEvmTokens: typeof generated.useGetRuntimeEvmTokens = (
return {
...token,
evm_contract_addr: `0x${token.evm_contract_addr}`,
total_supply:
token.total_supply != null && token.decimals != null
? fromBaseUnits(token.total_supply, token.decimals)
: token.total_supply,
layer: runtime,
network,
}
Expand Down

0 comments on commit 6f622a0

Please sign in to comment.