From 9926df6ab518b0f085d739d581ad5db49b97dade Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Wed, 19 Mar 2025 14:21:47 +0200 Subject: [PATCH] fix(core): add `LayoutObj.ble_event` mock [no changelog] --- core/embed/rust/src/ui/api/firmware_micropython.rs | 3 +++ core/mocks/generated/trezorui_api.pyi | 2 ++ 2 files changed, 5 insertions(+) diff --git a/core/embed/rust/src/ui/api/firmware_micropython.rs b/core/embed/rust/src/ui/api/firmware_micropython.rs index f2f3737df9..935d3e0f5d 100644 --- a/core/embed/rust/src/ui/api/firmware_micropython.rs +++ b/core/embed/rust/src/ui/api/firmware_micropython.rs @@ -1068,6 +1068,9 @@ pub static mp_module_trezorui_api: Module = obj_module! { /// def usb_event(self, connected: bool) -> LayoutState | None: /// """Receive a USB connect/disconnect event.""" /// + /// def ble_event(self, event: tuple[int, bytes]) -> LayoutState | None: + /// """Receive a BLE event.""" + /// /// def timer(self, token: int) -> LayoutState | None: /// """Callback for the timer set by `attach_timer_fn`. /// diff --git a/core/mocks/generated/trezorui_api.pyi b/core/mocks/generated/trezorui_api.pyi index faa5cf454a..6751bc1450 100644 --- a/core/mocks/generated/trezorui_api.pyi +++ b/core/mocks/generated/trezorui_api.pyi @@ -26,6 +26,8 @@ class LayoutObj(Generic[T]): """Receive a progress event.""" def usb_event(self, connected: bool) -> LayoutState | None: """Receive a USB connect/disconnect event.""" + def ble_event(self, event: tuple[int, bytes]) -> LayoutState | None: + """Receive a BLE event.""" def timer(self, token: int) -> LayoutState | None: """Callback for the timer set by `attach_timer_fn`. This function should be called by the executor after the corresponding