Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions core/src/apps/management/wipe_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ async def wipe_device(ctx: wire.GenericContext, msg: WipeDevice) -> Success:
)

await confirm_wipe_device(ctx)
# verify user pin
if not __debug__:
from apps.common.pin_constants import PinType

await verify_user_pin(
ctx, allow_fingerprint=False, pin_use_type=PinType.USER_CHECK
)
from apps.common.pin_constants import PinType

await verify_user_pin(
ctx,
allow_fingerprint=False,
pin_use_type=PinType.USER_CHECK,
standy_wall_only=True,
)
# show tips
await confirm_wipe_device_tips(ctx)
storage.wipe()
Expand Down
1 change: 1 addition & 0 deletions core/src/trezor/lvglui/scrs/homescreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4314,6 +4314,7 @@ def eventhandler(self, event_obj):
callback=self.back,
allow_fingerprint=False,
pin_use_type=1,
standy_wall_only=True,
)
)
else:
Expand Down
12 changes: 4 additions & 8 deletions core/src/trezor/lvglui/scrs/nfc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from trezorio import nfc

from trezor import io, loop
from trezor import loop
from trezor.crypto import bip39

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


def perform_ticks(motor_ctl, num_ticks):
for _ticks in range(num_ticks):
motor_ctl.tick()


async def handle_cleanup(self, data):
self.channel.publish(data)
await loop.sleep(180)
Expand All @@ -58,11 +53,12 @@ async def handle_cleanup(self, data):


async def run_card_search(self):
from trezor import motor

while self.searching:
await loop.sleep(1000)
if nfc.poll_card():
MOTOR_CTL = io.MOTOR()
perform_ticks(MOTOR_CTL, 80)
motor.vibrate(motor.HEAVY)
self.searching = False
self.channel.publish(LITE_CARD_FIND)
self.clean()
Expand Down
Loading