mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 15:30:55 +00:00
apps/common/request_pin: fix request_pin_on_display
This commit is contained in:
parent
e3a6ef185b
commit
f8d961f839
@ -26,11 +26,14 @@ async def request_pin_on_display(ctx: wire.Context, code: int=None) -> str:
|
|||||||
ui.display.clear()
|
ui.display.clear()
|
||||||
matrix = PinMatrix(label)
|
matrix = PinMatrix(label)
|
||||||
dialog = ConfirmDialog(matrix)
|
dialog = ConfirmDialog(matrix)
|
||||||
|
|
||||||
|
result = await dialog
|
||||||
pin = matrix.pin
|
pin = matrix.pin
|
||||||
matrix = None
|
matrix = None
|
||||||
|
|
||||||
if await dialog != CONFIRMED:
|
if result != CONFIRMED:
|
||||||
raise wire.FailureError(PinCancelled, 'PIN cancelled')
|
raise wire.FailureError(PinCancelled, 'PIN cancelled')
|
||||||
|
|
||||||
return pin
|
return pin
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +63,7 @@ async def request_pin_on_client(ctx: wire.Context, code: int=None) -> str:
|
|||||||
return _decode_pin(ack.pin, digits)
|
return _decode_pin(ack.pin, digits)
|
||||||
|
|
||||||
|
|
||||||
request_pin = request_pin_on_client
|
request_pin = request_pin_on_display
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
@unimport
|
||||||
|
Loading…
Reference in New Issue
Block a user