From 2d5b1f090d8f0bf9154ec77957890da1a9e864e5 Mon Sep 17 00:00:00 2001 From: benthecarman <15256660+benthecarman@users.noreply.github.com> Date: Sun, 18 Feb 2024 19:29:53 +0000 Subject: [PATCH] Handle space separated NWC info event (#855) --- components/webln/nwc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/webln/nwc.js b/components/webln/nwc.js index d177db4b9..fef7c798c 100644 --- a/components/webln/nwc.js +++ b/components/webln/nwc.js @@ -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() },