From 45519f8339583bcbbb57897e7de8f7b2c39c9ef5 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sat, 5 Nov 2022 23:12:25 +0100 Subject: [PATCH] block button --- lnbits/extensions/cashu/templates/cashu/wallet.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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