diff --git a/src/libs/utils.js b/src/libs/utils.js index a0c16bc5..5ee92a8e 100644 --- a/src/libs/utils.js +++ b/src/libs/utils.js @@ -390,10 +390,11 @@ export function isTestnet() { export function formatToken(token, IBCDenom = {}, decimals = 2, withDenom = true) { if (token) { + const denom = IBCDenom[token.denom] || token.denom if (withDenom) { - return `${formatTokenAmount(token.amount, decimals, token.denom)} ${formatTokenDenom(IBCDenom[token.denom] || token.denom)}` + return `${formatTokenAmount(token.amount, decimals, denom)} ${formatTokenDenom(denom)}` } - return formatTokenAmount(token.amount, decimals, token.denom) + return formatTokenAmount(token.amount, decimals, denom) } return token }