From bdfefc2506220c0ea081d9c0bf9fddf0f16ce39e Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Wed, 23 Jul 2025 14:25:27 +0100 Subject: [PATCH] [Fix] Don't allow pay for expired invoice (#3290) --- lnbits/static/js/wallet.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lnbits/static/js/wallet.js b/lnbits/static/js/wallet.js index d613770d..67efc66f 100644 --- a/lnbits/static/js/wallet.js +++ b/lnbits/static/js/wallet.js @@ -141,6 +141,13 @@ window.WalletPageLogic = { }, canPay() { if (!this.parse.invoice) return false + if (this.parse.invoice.expired) { + Quasar.Notify.create({ + message: 'Invoice has expired', + color: 'negative' + }) + return false + } return this.parse.invoice.sat <= this.g.wallet.sat }, formattedAmount() { @@ -275,7 +282,10 @@ window.WalletPageLogic = { this.readNfcTag() } // WITHDRAW - if (response.data.extra.lnurl_response !== null) { + if ( + this.receive.lnurl && + response.data.extra?.lnurl_response !== null + ) { if (response.data.extra.lnurl_response === false) { response.data.extra.lnurl_response = `Unable to connect` }