fix decimals for gravity assets
This commit is contained in:
parent
7469cd1178
commit
a8a3a202eb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user