mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-10 12:25:55 +00:00
fix(core): do not use local import for RecoveryAborted
This side-steps a double-import problem that is triggered when we perform an unimport in a particularly unfortunate order. (don't ask) The root cause of the problem still exists: we can get into a situation where a live recovery_homescreen is running from an unimported module, meaning that any new import of anything from the recovery_device namespace will _also_ be a double-import. We don't have a fix for that situation yet, so instead we avoid this particular local import, which would cause homescreen_dialog to have its own copy of the `recover` module.
This commit is contained in:
parent
2ee0f7028c
commit
87b7eccb6a
1
core/.changelog.d/3503.fixed
Normal file
1
core/.changelog.d/3503.fixed
Normal file
@ -0,0 +1 @@
|
||||
Fix cancelling device recovery after aborting from Suite.
|
@ -9,6 +9,8 @@ from trezor.ui.layouts.recovery import ( # noqa: F401
|
||||
|
||||
from apps.common import backup_types
|
||||
|
||||
from .recover import RecoveryAborted
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Awaitable
|
||||
|
||||
@ -175,8 +177,6 @@ async def homescreen_dialog(
|
||||
import storage.recovery as storage_recovery
|
||||
from trezor.ui.layouts.recovery import continue_recovery
|
||||
|
||||
from .recover import RecoveryAborted
|
||||
|
||||
recovery_type = storage_recovery.get_type()
|
||||
if not await continue_recovery(
|
||||
button_label,
|
||||
|
Loading…
Reference in New Issue
Block a user