This commit is contained in:
liangping 2021-12-23 10:40:53 +08:00
parent 7aa3992eb0
commit 13c78855a7
2 changed files with 7 additions and 2 deletions

View File

@ -20,7 +20,7 @@
class="mr-1" class="mr-1"
/> />
<span class="menu-title text-truncate">{{ t(item.title) }}</span> <span class="menu-title text-truncate text-capitalize">{{ item.title }}</span>
<b-badge <b-badge
v-if="item.tag" v-if="item.tag"
pill pill

View File

@ -298,6 +298,9 @@ export function formatTokenDenom(tokenDenom) {
} }
export function getUnitAmount(amount, denom) { export function getUnitAmount(amount, denom) {
if (denom === 'boot') {
return String(amount)
}
if (denom.startsWith('basecro')) { if (denom.startsWith('basecro')) {
return String((Number(amount) * 100000000).toFixed()) return String((Number(amount) * 100000000).toFixed())
} }
@ -314,7 +317,9 @@ export function getUnitAmount(amount, denom) {
export function formatTokenAmount(tokenAmount, fraction = 2, denom = 'uatom') { export function formatTokenAmount(tokenAmount, fraction = 2, denom = 'uatom') {
let amount let amount
if (denom.startsWith('inj')) { if (denom === 'boot') {
amount = Number(tokenAmount)
} else if (denom.startsWith('inj')) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n) amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n)
// } // }