diff --git a/.changelog/570.trivial.md b/.changelog/570.trivial.md new file mode 100644 index 000000000..9a74ac8a6 --- /dev/null +++ b/.changelog/570.trivial.md @@ -0,0 +1 @@ +Fix token supply formatting diff --git a/src/oasis-indexer/api.ts b/src/oasis-indexer/api.ts index 56ba64805..3a64c2d21 100644 --- a/src/oasis-indexer/api.ts +++ b/src/oasis-indexer/api.ts @@ -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, }