diff --git a/lnbits/extensions/cashu/templates/cashu/wallet.html b/lnbits/extensions/cashu/templates/cashu/wallet.html index b6919e85f..7eb81c9d8 100644 --- a/lnbits/extensions/cashu/templates/cashu/wallet.html +++ b/lnbits/extensions/cashu/templates/cashu/wallet.html @@ -307,7 +307,7 @@

{% endraw %}
- Pay + Pay Cancel @@ -759,6 +759,7 @@ }, invoiceCheckListener: () => {}, payInvoiceData: { + blocking: false, // invoice: '', bolt11: '', // camera: { @@ -1590,6 +1591,7 @@ return {fristProofs, scndProofs} } catch (error) { + this.payInvoiceData.blocking = false console.error(error) LNbits.utils.notifyApiError(error) throw error @@ -1680,6 +1682,8 @@ }, melt: async function () { // todo: get fees from server and add to inputs + this.payInvoiceData.blocking = true + console.log('#### pay lightning') const amount_invoice = this.payInvoiceData.invoice.sat const amount = @@ -1718,9 +1722,8 @@ type: 'positive', message: 'Invoice paid' }) - // delete tokens from db + // delete spent tokens from db this.proofs = fristProofs - // add new fristProofs, scndProofs to this.proofs this.storeProofs() console.log({ amount: -amount, @@ -1741,8 +1744,10 @@ this.payInvoiceData.invoice = false this.payInvoiceData.show = false + this.payInvoiceData.blocking = false } catch (error) { + this.payInvoiceData.blocking = false console.error(error) LNbits.utils.notifyApiError(error) throw error