[fix]: small fixes v1 on demo DB (#2940)
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -312,7 +312,7 @@ window.LNbits = {
|
|||||||
formatCurrency(value, currency) {
|
formatCurrency(value, currency) {
|
||||||
return new Intl.NumberFormat(window.LOCALE, {
|
return new Intl.NumberFormat(window.LOCALE, {
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
currency: currency
|
currency: currency || 'sat'
|
||||||
}).format(value)
|
}).format(value)
|
||||||
},
|
},
|
||||||
formatSat(value) {
|
formatSat(value) {
|
||||||
|
|||||||
@@ -650,10 +650,10 @@ window.WalletPageLogic = {
|
|||||||
(this.g.exchangeRate / 100000000) * this.g.wallet.sat
|
(this.g.exchangeRate / 100000000) * this.g.wallet.sat
|
||||||
this.formatFiatAmount(this.g.fiatBalance, currency)
|
this.formatFiatAmount(this.g.fiatBalance, currency)
|
||||||
}
|
}
|
||||||
LNbits.api
|
if (currency && this.g.wallet.currency == currency) {
|
||||||
.request('GET', `/api/v1/rate/` + currency, null)
|
LNbits.api
|
||||||
.then(response => {
|
.request('GET', `/api/v1/rate/` + currency, null)
|
||||||
if (this.g.wallet.currency == currency) {
|
.then(response => {
|
||||||
this.g.fiatBalance =
|
this.g.fiatBalance =
|
||||||
(response.data.price / 100000000) * this.g.wallet.sat
|
(response.data.price / 100000000) * this.g.wallet.sat
|
||||||
this.g.exchangeRate = response.data.price.toFixed(2)
|
this.g.exchangeRate = response.data.price.toFixed(2)
|
||||||
@@ -663,9 +663,9 @@ window.WalletPageLogic = {
|
|||||||
'lnbits.exchangeRate.' + currency,
|
'lnbits.exchangeRate.' + currency,
|
||||||
this.g.exchangeRate
|
this.g.exchangeRate
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
})
|
.catch(e => console.error(e))
|
||||||
.catch(e => console.error(e))
|
}
|
||||||
},
|
},
|
||||||
pasteToTextArea() {
|
pasteToTextArea() {
|
||||||
this.$refs.textArea.focus()
|
this.$refs.textArea.focus()
|
||||||
|
|||||||
Reference in New Issue
Block a user