fix: small number of commission & rewards

This commit is contained in:
liangping 2023-10-30 09:19:34 +08:00
parent 36c73ec5ee
commit 3ffcc90dd2

View File

@ -259,7 +259,10 @@ export const useFormatter = defineStore('formatter', {
if(amount < 0.01) { if(amount < 0.01) {
fmt = '0.[000000]' fmt = '0.[000000]'
} }
if(amount < 0.000001) {
return `0 ${denom.substring(0, 10)}`;
}
console.log("amount:", amount, numeral(amount).format(fmt))
return `${numeral(amount).format(fmt)} ${ return `${numeral(amount).format(fmt)} ${
withDenom ? denom.substring(0, 10) : '' withDenom ? denom.substring(0, 10) : ''
}`; }`;