diff --git a/src/apps/common/request_pin.py b/src/apps/common/request_pin.py index 70e9f0b1c4..f85356c34b 100644 --- a/src/apps/common/request_pin.py +++ b/src/apps/common/request_pin.py @@ -67,13 +67,14 @@ request_pin = request_pin_on_client @unimport async def request_pin_twice(session_id: int) -> str: - from trezor.messages.FailureType import PinInvalid + from trezor.messages.FailureType import ActionCancelled from trezor.messages import PinMatrixRequestType pin_first = await request_pin(session_id, PinMatrixRequestType.NewFirst) pin_again = await request_pin(session_id, PinMatrixRequestType.NewSecond) if pin_first != pin_again: - raise wire.FailureError(PinInvalid, 'PIN invalid') + # changed message due to consistency with T1 msgs + raise wire.FailureError(ActionCancelled, 'PIN change failed') return pin_first