[Fix] Don't allow pay for expired invoice (#3290)

This commit is contained in:
Tiago Vasconcelos 2025-07-23 14:25:27 +01:00 committed by GitHub
parent 2a9f471783
commit bdfefc2506
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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`
}