From b4aebc5c163d7cf0491e4241e2758e893f0657e6 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Mon, 11 Nov 2024 13:34:06 +0100 Subject: [PATCH] fix reply after erase bonds, disconnect --- core/src/apps/management/ble/disconnect.py | 8 +++++++- core/src/apps/management/ble/erase_bonds.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/src/apps/management/ble/disconnect.py b/core/src/apps/management/ble/disconnect.py index 8b3603b669..bceee2f8df 100644 --- a/core/src/apps/management/ble/disconnect.py +++ b/core/src/apps/management/ble/disconnect.py @@ -8,9 +8,15 @@ if TYPE_CHECKING: async def disconnect(_msg: Disconnect) -> Success: from trezor.messages import Success from trezor.ui.layouts import confirm_action + from trezor.wire.context import get_context await confirm_action("disconnect", "DISCONNECT") + ctx = get_context() + + await ctx.write(Success(message="Erasing")) + ble.disconnect() - return Success() + raise RuntimeError + diff --git a/core/src/apps/management/ble/erase_bonds.py b/core/src/apps/management/ble/erase_bonds.py index a721e9f109..50ebea8d0b 100644 --- a/core/src/apps/management/ble/erase_bonds.py +++ b/core/src/apps/management/ble/erase_bonds.py @@ -8,9 +8,15 @@ if TYPE_CHECKING: async def erase_bonds(_msg: EraseBonds) -> Success: from trezor.messages import Success from trezor.ui.layouts import confirm_action + from trezor.wire.context import get_context await confirm_action("erase bonds", "ERASE BONDS") + ctx = get_context() + + await ctx.write(Success(message="Erasing")) + ble.erase_bonds() - return Success() + raise RuntimeError +