Skip to content

Commit 0045c61

Browse files
authored
fix: lite motor and reset pin title (#359)
* fix: lite motor and reset pin title
1 parent cff8c76 commit 0045c61

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

core/src/apps/management/wipe_device.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ async def wipe_device(ctx: wire.GenericContext, msg: WipeDevice) -> Success:
1919
)
2020

2121
await confirm_wipe_device(ctx)
22-
# verify user pin
23-
if not __debug__:
24-
from apps.common.pin_constants import PinType
2522

26-
await verify_user_pin(
27-
ctx, allow_fingerprint=False, pin_use_type=PinType.USER_CHECK
28-
)
23+
from apps.common.pin_constants import PinType
24+
25+
await verify_user_pin(
26+
ctx,
27+
allow_fingerprint=False,
28+
pin_use_type=PinType.USER_CHECK,
29+
standy_wall_only=True,
30+
)
2931
# show tips
3032
await confirm_wipe_device_tips(ctx)
3133
storage.wipe()

core/src/trezor/lvglui/scrs/homescreen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4314,6 +4314,7 @@ def eventhandler(self, event_obj):
43144314
callback=self.back,
43154315
allow_fingerprint=False,
43164316
pin_use_type=1,
4317+
standy_wall_only=True,
43174318
)
43184319
)
43194320
else:

core/src/trezor/lvglui/scrs/nfc.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from trezorio import nfc
22

3-
from trezor import io, loop
3+
from trezor import loop
44
from trezor.crypto import bip39
55

66
from ..i18n import gettext as _, keys as i18n_keys
@@ -45,11 +45,6 @@ async def handle_sw1sw2_connect_error(self):
4545
self.destroy()
4646

4747

48-
def perform_ticks(motor_ctl, num_ticks):
49-
for _ticks in range(num_ticks):
50-
motor_ctl.tick()
51-
52-
5348
async def handle_cleanup(self, data):
5449
self.channel.publish(data)
5550
await loop.sleep(180)
@@ -58,11 +53,12 @@ async def handle_cleanup(self, data):
5853

5954

6055
async def run_card_search(self):
56+
from trezor import motor
57+
6158
while self.searching:
6259
await loop.sleep(1000)
6360
if nfc.poll_card():
64-
MOTOR_CTL = io.MOTOR()
65-
perform_ticks(MOTOR_CTL, 80)
61+
motor.vibrate(motor.HEAVY)
6662
self.searching = False
6763
self.channel.publish(LITE_CARD_FIND)
6864
self.clean()

0 commit comments

Comments
 (0)