1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

fix reply after erase bonds, disconnect

This commit is contained in:
tychovrahe 2024-11-11 13:34:06 +01:00
parent 043617f83c
commit b4aebc5c16
2 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -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