Skip to content

Commit

Permalink
Handle space separated NWC info event (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored Feb 18, 2024
1 parent 6e6c355 commit 2d5b1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/webln/nwc.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async function getInfoWithRelay (relay, walletPubkey) {
], {
onevent (event) {
clearTimeout(timer)
const supported = event.content.split(',')
const supported = event.content.split(/[\s,]+/) // handle both spaces and commas
supported.includes('pay_invoice') ? resolve() : reject(new Error('wallet does not support pay_invoice'))
sub.close()
},
Expand Down

0 comments on commit 2d5b1f0

Please sign in to comment.