mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +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:
|
async def disconnect(_msg: Disconnect) -> Success:
|
||||||
from trezor.messages import Success
|
from trezor.messages import Success
|
||||||
from trezor.ui.layouts import confirm_action
|
from trezor.ui.layouts import confirm_action
|
||||||
|
from trezor.wire.context import get_context
|
||||||
|
|
||||||
await confirm_action("disconnect", "DISCONNECT")
|
await confirm_action("disconnect", "DISCONNECT")
|
||||||
|
|
||||||
|
ctx = get_context()
|
||||||
|
|
||||||
|
await ctx.write(Success(message="Erasing"))
|
||||||
|
|
||||||
ble.disconnect()
|
ble.disconnect()
|
||||||
|
|
||||||
return Success()
|
raise RuntimeError
|
||||||
|
|
||||||
|
@ -8,9 +8,15 @@ if TYPE_CHECKING:
|
|||||||
async def erase_bonds(_msg: EraseBonds) -> Success:
|
async def erase_bonds(_msg: EraseBonds) -> Success:
|
||||||
from trezor.messages import Success
|
from trezor.messages import Success
|
||||||
from trezor.ui.layouts import confirm_action
|
from trezor.ui.layouts import confirm_action
|
||||||
|
from trezor.wire.context import get_context
|
||||||
|
|
||||||
await confirm_action("erase bonds", "ERASE BONDS")
|
await confirm_action("erase bonds", "ERASE BONDS")
|
||||||
|
|
||||||
|
ctx = get_context()
|
||||||
|
|
||||||
|
await ctx.write(Success(message="Erasing"))
|
||||||
|
|
||||||
ble.erase_bonds()
|
ble.erase_bonds()
|
||||||
|
|
||||||
return Success()
|
raise RuntimeError
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user