diff --git a/src/libs/utils.js b/src/libs/utils.js index e36bc012..09befd4f 100644 --- a/src/libs/utils.js +++ b/src/libs/utils.js @@ -363,7 +363,7 @@ export function numberWithCommas(x) { return parts.join('.') } -export function formatTokenAmount(tokenAmount, fraction = 2, tokenDenom = 'uatom') { +export function formatTokenAmount(tokenAmount, fraction = 2, tokenDenom = 'uatom', format = true) { const denom = tokenDenom.denom_trace ? tokenDenom.denom_trace.base_denom : tokenDenom let amount = 0 @@ -378,7 +378,8 @@ export function formatTokenAmount(tokenAmount, fraction = 2, tokenDenom = 'uatom }) amount = Number(Number(tokenAmount)) / (10 ** exp) if (amount > 10) { - return numberWithCommas(parseFloat(amount.toFixed(fraction))) + if (format) { return numberWithCommas(parseFloat(amount.toFixed(fraction))) } + return parseFloat(amount.toFixed(fraction)) } return parseFloat(amount.toFixed(fraction)) } diff --git a/src/views/WalletAccounts.vue b/src/views/WalletAccounts.vue index 92ead107..2bbf5033 100644 --- a/src/views/WalletAccounts.vue +++ b/src/views/WalletAccounts.vue @@ -1,7 +1,6 @@