mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 19:37:42 +01:00
fix: wallet balance format (#2985)
This commit is contained in:
parent
4511891297
commit
2af5ac9678
2 changed files with 12 additions and 3 deletions
|
@ -61,7 +61,7 @@
|
|||
<div class="col-auto">
|
||||
<div class="text-h3 q-my-none text-no-wrap">
|
||||
<strong
|
||||
v-text="formatBalance(this.g.wallet.sat)"
|
||||
v-text="walletFormatBalance(this.g.wallet.sat)"
|
||||
></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -704,7 +704,7 @@
|
|||
<div class="column content-center text-center q-mb-md">
|
||||
<div v-if="!isFiatPriority">
|
||||
<h4 class="q-my-none text-bold">
|
||||
<span v-text="formatBalance(parse.invoice.sat)"></span>
|
||||
<span v-text="walletFormatBalance(parse.invoice.sat)"></span>
|
||||
</h4>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
@ -734,7 +734,9 @@
|
|||
</div>
|
||||
<div v-else style="opacity: 0.75">
|
||||
<h5 class="q-my-none text-bold">
|
||||
<span v-text="formatBalance(parse.invoice.sat)"></span>
|
||||
<span
|
||||
v-text="walletFormatBalance(parse.invoice.sat)"
|
||||
></span>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -844,6 +844,13 @@ window.WalletPageLogic = {
|
|||
this.g.fiatTracking = false
|
||||
}
|
||||
},
|
||||
walletFormatBalance(amount) {
|
||||
if (LNBITS_DENOMINATION != 'sats') {
|
||||
return LNbits.utils.formatCurrency(amount / 100, LNBITS_DENOMINATION)
|
||||
} else {
|
||||
return LNbits.utils.formatSat(amount) + ' sats'
|
||||
}
|
||||
},
|
||||
handleFilterChange(value = {}) {
|
||||
if (
|
||||
this.paymentsFilter['time[ge]'] !== value['time[ge]'] ||
|
||||
|
|
Loading…
Add table
Reference in a new issue