Handle space separated NWC info event (#855)

This commit is contained in:
benthecarman 2024-02-18 19:29:53 +00:00 committed by GitHub
parent 6e6c355a3f
commit 2d5b1f090d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ async function getInfoWithRelay (relay, walletPubkey) {
], { ], {
onevent (event) { onevent (event) {
clearTimeout(timer) 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')) supported.includes('pay_invoice') ? resolve() : reject(new Error('wallet does not support pay_invoice'))
sub.close() sub.close()
}, },