Skip to content

Commit f38cc9f

Browse files
committed
fix: comments
1 parent 5ded194 commit f38cc9f

File tree

1 file changed

+2
-3
lines changed
  • packages/neuron-ui/src/components/CellManagement

1 file changed

+2
-3
lines changed

packages/neuron-ui/src/components/CellManagement/hooks.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,8 @@ export const useHardWallet = ({ wallet, t }: { wallet: State.WalletIdentity; t:
416416
const [error, setError] = useState<ErrorCode | string | undefined>()
417417
const isNotAvailable = useMemo(() => {
418418
return (
419-
error === ErrorCode.DeviceNotFound ||
420-
error === ErrorCode.CkbAppNotFound ||
421-
error === ErrorCode.DeviceNotMatchWallet
419+
typeof error === 'number' &&
420+
[ErrorCode.DeviceNotFound, ErrorCode.CkbAppNotFound, ErrorCode.DeviceNotMatchWallet].includes(error)
422421
)
423422
}, [error])
424423

0 commit comments

Comments
 (0)