mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
src/apps/management/recovery_device: ask for PIN in dry_run
This commit is contained in:
parent
b1a382c75b
commit
1bc69fa2d6
@ -17,7 +17,7 @@ from trezor.utils import consteq, format_ordinal
|
|||||||
|
|
||||||
from apps.common import storage
|
from apps.common import storage
|
||||||
from apps.common.confirm import require_confirm
|
from apps.common.confirm import require_confirm
|
||||||
from apps.management.change_pin import request_pin_confirm
|
from apps.management.change_pin import request_pin_ack, request_pin_confirm
|
||||||
|
|
||||||
|
|
||||||
async def recovery_device(ctx, msg):
|
async def recovery_device(ctx, msg):
|
||||||
@ -38,6 +38,11 @@ async def recovery_device(ctx, msg):
|
|||||||
|
|
||||||
await require_confirm(ctx, text, code=ProtectCall)
|
await require_confirm(ctx, text, code=ProtectCall)
|
||||||
|
|
||||||
|
if msg.dry_run and config.has_pin():
|
||||||
|
curpin = await request_pin_ack(ctx, "Enter PIN", config.get_pin_rem())
|
||||||
|
if not config.check_pin(pin_to_int(curpin)):
|
||||||
|
raise wire.PinInvalid("PIN invalid")
|
||||||
|
|
||||||
# ask for the number of words
|
# ask for the number of words
|
||||||
wordcount = await request_wordcount(ctx)
|
wordcount = await request_wordcount(ctx)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user