Skip to content

Commit

Permalink
Merge pull request #60 from reneaaron/fix/isenabled
Browse files Browse the repository at this point in the history
fix: implement webln spec
  • Loading branch information
bumi authored May 31, 2024
2 parents b9b2ce8 + 47efbfc commit 70028e4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions files/assets/lnme.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,11 @@ class LnMe {
}

payWithWebln() {
if (!webln.isEnabled) {
webln.enable().then((weblnResponse) => {
return webln.sendPayment(this.invoice.payment_request);
}).catch((e) => {
return this.showPaymentRequest();
})
} else {
webln.enable().then((weblnResponse) => {
return webln.sendPayment(this.invoice.payment_request);
}
}).catch((e) => {
return this.showPaymentRequest();
})
}

populatePaymentRequest() {
Expand Down

0 comments on commit 70028e4

Please sign in to comment.