def boot(): # wipe storage when debug build is used storage.wipe() register(MessageType.DebugLinkDecision, protobuf_workflow, dispatch_DebugLinkDecision) register(MessageType.DebugLinkGetState, protobuf_workflow, dispatch_DebugLinkGetState)
def boot(): # wipe storage when debug build is used on real hardware if not utils.EMULATOR: storage.wipe() register(MessageType.DebugLinkDecision, protobuf_workflow, dispatch_DebugLinkDecision) register(MessageType.DebugLinkGetState, protobuf_workflow, dispatch_DebugLinkGetState)
async def recovery_process(ctx: wire.GenericContext) -> Success: try: return await _continue_recovery_process(ctx) except recover.RecoveryAborted: dry_run = storage_recovery.is_dry_run() if dry_run: storage_recovery.end_progress() else: storage.wipe() raise wire.ActionCancelled("Cancelled")
async def wipe_device(ctx, msg): await require_hold_to_confirm(ctx, Text( 'Wipe device', ui.ICON_WIPE, ui.NORMAL, 'Do you really want to', 'wipe the device?', ui.NORMAL, '', 'All data will be lost.', icon_color=ui.RED), code=ButtonRequestType.WipeDevice, button_style=ui.BTN_CANCEL, loader_style=ui.LDR_DANGER) storage.wipe() return Success(message='Device wiped')
async def wipe_device(ctx, msg): text = Text("Wipe device", ui.ICON_WIPE, ui.RED) text.normal("Do you really want to", "wipe the device?", "") text.bold("All data will be lost.") await require_hold_to_confirm( ctx, text, ButtonRequestType.WipeDevice, confirm_style=ButtonCancel, loader_style=LoaderDanger, ) storage.wipe() return Success(message="Device wiped")
async def wipe_device(ctx, msg): text = Text("Wipe device", ui.ICON_WIPE, icon_color=ui.RED) text.normal("Do you really want to", "wipe the device?", "") text.bold("All data will be lost.") await require_hold_to_confirm( ctx, text, code=ButtonRequestType.WipeDevice, button_style=ui.BTN_CANCEL, loader_style=ui.LDR_DANGER, ) storage.wipe() return Success(message="Device wiped")