mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-24 07:28:34 +00:00
fix(core): use interact
for ble pairing instead of raise_if_cancelled
[no changelog]
This commit is contained in:
parent
bd501ad8a3
commit
95b578c99a
@ -3,7 +3,7 @@ import trezorui_api
|
||||
from storage import device as storage_device
|
||||
from trezor import utils
|
||||
from trezor.crypto import random
|
||||
from trezor.ui.layouts import CONFIRMED, raise_if_cancelled
|
||||
from trezor.ui.layouts import CONFIRMED, interact
|
||||
from trezor.wire import ActionCancelled
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ async def pair_new_device() -> None:
|
||||
label = storage_device.get_label() or _default_ble_name()
|
||||
ble.start_advertising(False, label)
|
||||
try:
|
||||
code = await raise_if_cancelled(
|
||||
code = await interact(
|
||||
trezorui_api.show_pairing_device_name(
|
||||
device_name=label,
|
||||
),
|
||||
@ -45,7 +45,7 @@ async def pair_new_device() -> None:
|
||||
raise ActionCancelled
|
||||
|
||||
try:
|
||||
result = await raise_if_cancelled(
|
||||
result = await interact(
|
||||
trezorui_api.show_ble_pairing_code(
|
||||
title="Bluetooth pairing",
|
||||
description="Pairing code match?",
|
||||
|
Loading…
Reference in New Issue
Block a user