abbr for long denom

This commit is contained in:
liangping 2022-04-10 18:29:43 +08:00
parent ee92f5eb68
commit 62643e9e07

View File

@ -337,7 +337,7 @@ export function formatTokenDenom(tokenDenom) {
if (asset) denom = asset.symbol
}
})
return denom.startsWith('ibc') ? `IBC...${denom.substring(denom.length - 3)}` : denom.toUpperCase()
return denom.length > 10 ? `${denom.substring(0, 7).toUpperCase()}..${denom.substring(denom.length - 3)}` : denom.toUpperCase()
}
return ''
}