mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-02 08:58:33 +02:00
[fix]: small fixes v1 on demo DB (#2940)
This commit is contained in:
parent
90dd3cc73a
commit
828261d696
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -312,7 +312,7 @@ window.LNbits = {
|
||||
formatCurrency(value, currency) {
|
||||
return new Intl.NumberFormat(window.LOCALE, {
|
||||
style: 'currency',
|
||||
currency: currency
|
||||
currency: currency || 'sat'
|
||||
}).format(value)
|
||||
},
|
||||
formatSat(value) {
|
||||
|
@ -650,10 +650,10 @@ window.WalletPageLogic = {
|
||||
(this.g.exchangeRate / 100000000) * this.g.wallet.sat
|
||||
this.formatFiatAmount(this.g.fiatBalance, currency)
|
||||
}
|
||||
LNbits.api
|
||||
.request('GET', `/api/v1/rate/` + currency, null)
|
||||
.then(response => {
|
||||
if (this.g.wallet.currency == currency) {
|
||||
if (currency && this.g.wallet.currency == currency) {
|
||||
LNbits.api
|
||||
.request('GET', `/api/v1/rate/` + currency, null)
|
||||
.then(response => {
|
||||
this.g.fiatBalance =
|
||||
(response.data.price / 100000000) * this.g.wallet.sat
|
||||
this.g.exchangeRate = response.data.price.toFixed(2)
|
||||
@ -663,9 +663,9 @@ window.WalletPageLogic = {
|
||||
'lnbits.exchangeRate.' + currency,
|
||||
this.g.exchangeRate
|
||||
)
|
||||
}
|
||||
})
|
||||
.catch(e => console.error(e))
|
||||
})
|
||||
.catch(e => console.error(e))
|
||||
}
|
||||
},
|
||||
pasteToTextArea() {
|
||||
this.$refs.textArea.focus()
|
||||
|
Loading…
x
Reference in New Issue
Block a user