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])