Skip to content

Commit

Permalink
[CP-2870] Improper handling of an incorrectly entered passcode (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarski committed Sep 17, 2024
1 parent 2b1f372 commit 698c9fa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import { AppError } from "Core/core/errors"
import { ModalDialogProps } from "Core/ui"
import { ModalLayers } from "Core/modals-manager/constants/modal-layers.enum"
import { useHelpShortcut } from "help/store"
import { UnlockStatus } from "Core/device"

export type UnlockDeviceReturnType = Promise<
PayloadAction<boolean, string, unknown, AppError>
PayloadAction<UnlockStatus, string, unknown, AppError>
>

interface Props extends Omit<ModalDialogProps, "close" | "open"> {
Expand Down Expand Up @@ -79,7 +80,7 @@ const PasscodeModal: FunctionComponent<Props> = ({
return
}

if (!unlockDeviceStatus.payload) {
if (unlockDeviceStatus.payload !== "UNLOCKED") {
setErrorState(ErrorState.BadPasscode)
return
}
Expand Down

0 comments on commit 698c9fa

Please sign in to comment.