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:
parent
043617f83c
commit
b4aebc5c16
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user