From 4dec34ca65425b61fd83c959c93884ab502705ec Mon Sep 17 00:00:00 2001 From: woodenfurniture <125113430+woodenfurniture@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:45:11 +1100 Subject: [PATCH] chore: dont try respond to events for empty device ID --- src/context/WalletProvider/KeepKey/components/Pin.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/context/WalletProvider/KeepKey/components/Pin.tsx b/src/context/WalletProvider/KeepKey/components/Pin.tsx index ea06d026f37..ec95503e9b5 100644 --- a/src/context/WalletProvider/KeepKey/components/Pin.tsx +++ b/src/context/WalletProvider/KeepKey/components/Pin.tsx @@ -142,10 +142,10 @@ export const KeepKeyPin = ({ } } - keyring.on(['KeepKey', deviceId ?? '', String(MessageType.FAILURE)], handleError) + deviceId && keyring.on(['KeepKey', deviceId, String(MessageType.FAILURE)], handleError) return () => { - keyring.off(['KeepKey', deviceId ?? '', String(MessageType.FAILURE)], handleError) + deviceId && keyring.off(['KeepKey', deviceId, String(MessageType.FAILURE)], handleError) } }, [deviceId, keyring])