1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-21 17:49:02 +00:00

wip: contextless handler

This commit is contained in:
Martin Milata 2025-04-08 17:10:27 +02:00
parent 398909b266
commit a9b5c3d74d

View File

@ -17,9 +17,11 @@ async def unpair(msg: BleUnpair) -> None:
else:
await confirm_action("unpair", TR.ble__unpair_title, TR.ble__unpair_current)
ctx = get_context()
await ctx.write(Success(message="Erasing.."))
try:
ctx = get_context()
await ctx.write(Success(message="Erasing.."))
except RuntimeError: # TODO newtype?
pass
if msg.all:
ble.erase_bonds()