async def recovery_homescreen() -> None: if not storage.recovery.is_in_progress(): workflow.replace_default(homescreen) return # recovery process does not communicate on the wire ctx = wire.DummyContext() await recovery_process(ctx)
async def recovery_homescreen() -> None: # recovery process does not communicate on the wire ctx = wire.DummyContext() try: await recovery_process(ctx) finally: # clear the loop state, so loop.run will exit loop.clear() # clear the registered wire handlers to avoid conflicts wire.clear()