Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
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")
Пример #4
0
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')
Пример #5
0
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")
Пример #6
0
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")