chore: cleanup LNBITS_DENOMINATION global var (#3580)

This commit is contained in:
dni ⚡
2025-11-26 15:15:20 +01:00
committed by GitHub
parent da31e3caaa
commit c6c67c52db
11 changed files with 18 additions and 32 deletions
+3 -5
View File
@@ -75,12 +75,10 @@ window.PageWallet = {
return this.parse.invoice.sat <= this.g.wallet.sat
},
formattedAmount() {
if (this.receive.unit != 'sat' || LNBITS_DENOMINATION != 'sats') {
if (this.receive.unit != 'sat' || !this.g.isSatsDenomination) {
return LNbits.utils.formatCurrency(
Number(this.receive.data.amount).toFixed(2),
LNBITS_DENOMINATION != 'sats'
? LNBITS_DENOMINATION
: this.receive.unit
!this.g.isSatsDenomination ? this.g.denomination : this.receive.unit
)
} else {
return LNbits.utils.formatMsat(this.receive.amountMsat) + ' sat'
@@ -148,7 +146,7 @@ window.PageWallet = {
},
createInvoice() {
this.receive.status = 'loading'
if (LNBITS_DENOMINATION != 'sats') {
if (!this.g.isSatsDenomination) {
this.receive.data.amount = this.receive.data.amount * 100
}