mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
trezor.ui: change failure pin msg
This commit is contained in:
parent
35e404bd38
commit
76705dde5b
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user