Payments added to chart (#2952)

This commit is contained in:
Arc 2025-02-11 12:26:04 +00:00 committed by GitHub
parent ed3a54e57a
commit 4d490506f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -237,6 +237,9 @@ window.app.component('payment-list', {
update() { update() {
this.fetchPayments() this.fetchPayments()
}, },
'g.updatePayments'() {
this.fetchPayments()
},
'g.wallet': { 'g.wallet': {
handler(newWallet) { handler(newWallet) {
this.fetchPayments() this.fetchPayments()

View file

@ -230,12 +230,12 @@ window.WalletPageLogic = {
this.receive.lnurl && this.receive.lnurl.callback this.receive.lnurl && this.receive.lnurl.callback
) )
.then(response => { .then(response => {
this.g.updatePayments = !this.g.updatePayments
this.receive.status = 'success' this.receive.status = 'success'
this.receive.paymentReq = response.data.bolt11 this.receive.paymentReq = response.data.bolt11
this.receive.amountMsat = response.data.amount this.receive.amountMsat = response.data.amount
this.receive.paymentHash = response.data.payment_hash this.receive.paymentHash = response.data.payment_hash
this.readNfcTag() this.readNfcTag()
// TODO: lnurl_callback and lnurl_response // TODO: lnurl_callback and lnurl_response
// WITHDRAW // WITHDRAW
if (response.data.lnurl_response !== null) { if (response.data.lnurl_response !== null) {
@ -261,13 +261,13 @@ window.WalletPageLogic = {
}) })
} }
} }
// Hack as rendering in dialog causes reactivity issues. Does speed up, as only rendering lnbits-qrcode once. // Hack as rendering in dialog causes reactivity issues. Does speed up, as only rendering lnbits-qrcode once.
this.$nextTick(() => { this.$nextTick(() => {
this.invoiceQrCode = document.getElementById( this.invoiceQrCode = document.getElementById(
'hiddenQrCodeContainer' 'hiddenQrCodeContainer'
).innerHTML ).innerHTML
}) })
this.g.updatePayments = !this.g.updatePayments
}) })
.catch(err => { .catch(err => {
LNbits.utils.notifyApiError(err) LNbits.utils.notifyApiError(err)