From fc9de9089d826f155d285fa0ab685b4970910c0f Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 10 Sep 2024 10:58:33 +0700 Subject: [PATCH] fix: do not crash if NWC connection does not support notifications --- pages/settings/wallets/WalletConnection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/settings/wallets/WalletConnection.tsx b/pages/settings/wallets/WalletConnection.tsx index 3bb0909..bb29b94 100644 --- a/pages/settings/wallets/WalletConnection.tsx +++ b/pages/settings/wallets/WalletConnection.tsx @@ -60,7 +60,7 @@ export function WalletConnection() { }); const info = await nwcClient.getInfo(); const capabilities = [...info.methods] as Nip47Capability[]; - if (info.notifications.length) { + if (info.notifications?.length) { capabilities.push("notifications"); } console.log("NWC connected", info);