Skip to content

Commit 795b8f3

Browse files
authored
fix: fix unlockpin issue (#375)
fix unlockpin issue
1 parent 7d239e2 commit 795b8f3

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

core/src/apps/common/request_pin.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,16 @@ async def verify_user_pin(
231231
except Exception:
232232
raise wire.PinCancelled("cal cale ..")
233233

234-
if verified and pin_use_type in (
235-
PinType.USER,
236-
PinType.PASSPHRASE_PIN,
237-
PinType.USER_AND_PASSPHRASE_PIN,
238-
):
239-
if usertype == PinResult.PASSPHRASE_PIN_ENTERED:
240-
device.set_passphrase_pin_enabled(True)
241-
elif usertype == PinResult.USER_PIN_ENTERED:
242-
device.set_passphrase_pin_enabled(False)
234+
if verified:
235+
if pin_use_type in (
236+
PinType.USER,
237+
PinType.PASSPHRASE_PIN,
238+
PinType.USER_AND_PASSPHRASE_PIN,
239+
):
240+
if usertype == PinResult.PASSPHRASE_PIN_ENTERED:
241+
device.set_passphrase_pin_enabled(True)
242+
elif usertype == PinResult.USER_PIN_ENTERED:
243+
device.set_passphrase_pin_enabled(False)
243244

244245
if re_loop:
245246
loop.clear()

0 commit comments

Comments
 (0)