forked from cerc-io/cosmos-explorer
fix issues
This commit is contained in:
parent
86b4ee0eaa
commit
0df70f5701
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<b-card
|
<b-card
|
||||||
|
v-if="calculateTotalChange !== 0"
|
||||||
border-variant="primary"
|
border-variant="primary"
|
||||||
>
|
>
|
||||||
<b-row class="mx-0 d-flex align-items-center">
|
<b-row class="mx-0 d-flex align-items-center">
|
||||||
@ -43,13 +44,13 @@
|
|||||||
v-if="calculateTotalChange > 0"
|
v-if="calculateTotalChange > 0"
|
||||||
class="my-0 text-success"
|
class="my-0 text-success"
|
||||||
>
|
>
|
||||||
+{{ calculateTotalChange }} (24h)
|
+{{ formatTotalChange(calculateTotalChange) }} (24h)
|
||||||
</small>
|
</small>
|
||||||
<small
|
<small
|
||||||
v-else
|
v-else
|
||||||
class="my-0 text-danger"
|
class="my-0 text-danger"
|
||||||
>
|
>
|
||||||
{{ calculateTotalChange }} (24h)
|
{{ formatTotalChange(calculateTotalChange) }} (24h)
|
||||||
</small>
|
</small>
|
||||||
<!-- chart -->
|
<!-- chart -->
|
||||||
<chart-component-doughnut
|
<chart-component-doughnut
|
||||||
@ -422,7 +423,7 @@ export default {
|
|||||||
total += subtotal
|
total += subtotal
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return numberWithCommas(parseFloat(total.toFixed(2)))
|
return parseFloat(total.toFixed(2))
|
||||||
},
|
},
|
||||||
calculateByDenom() {
|
calculateByDenom() {
|
||||||
const v = Object.values(this.balances)
|
const v = Object.values(this.balances)
|
||||||
@ -565,6 +566,9 @@ export default {
|
|||||||
const denom = (v.startsWith('ibc') ? this.ibcDenom[v] : v)
|
const denom = (v.startsWith('ibc') ? this.ibcDenom[v] : v)
|
||||||
return formatTokenDenom(denom)
|
return formatTokenDenom(denom)
|
||||||
},
|
},
|
||||||
|
formatTotalChange(v) {
|
||||||
|
return numberWithCommas(v)
|
||||||
|
},
|
||||||
formatAmount(v, denom = 'uatom', format = true) {
|
formatAmount(v, denom = 'uatom', format = true) {
|
||||||
if (!v) return ''
|
if (!v) return ''
|
||||||
const denom2 = (denom.startsWith('ibc') ? this.ibcDenom[denom] : denom)
|
const denom2 = (denom.startsWith('ibc') ? this.ibcDenom[denom] : denom)
|
||||||
|
Loading…
Reference in New Issue
Block a user