[Fix] Don't allow pay for expired invoice (#3290)
This commit is contained in:
parent
2a9f471783
commit
bdfefc2506
1 changed files with 11 additions and 1 deletions
|
|
@ -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`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue