Skip to content

Commit

Permalink
chore: dont try respond to events for empty device ID
Browse files Browse the repository at this point in the history
  • Loading branch information
woodenfurniture committed Jan 12, 2025
1 parent 96929cb commit 4dec34c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context/WalletProvider/KeepKey/components/Pin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 4dec34c

Please sign in to comment.