fix(suite-native): propagate battery-level notifications to transport

This commit is contained in:
yanas
2025-10-01 21:27:22 +02:00
committed by yanas
parent e3a50255d6
commit df22bb4241
2 changed files with 4 additions and 1 deletions

View File

@@ -17,6 +17,9 @@ export class NativeBluetoothTransport extends AbstractApiTransport {
api.on('trezor-push-notification', event => {
this.emit('trezor-push-notification', event);
});
api.on('battery-level', event => {
this.emit('battery-level', event);
});
super({ api, ...rest });
}

View File

@@ -183,7 +183,7 @@ export const selectIsDeviceConnectedViaBluetoothLowOnBattery = createMemoizedSel
(isDeviceConnectedViaBluetooth, features) =>
isDeviceConnectedViaBluetooth &&
typeof features?.soc === 'number' &&
features.soc <= DEVICE_LOW_BATTERY_PERCENTAGE_THRESHOLD,
features.soc < DEVICE_LOW_BATTERY_PERCENTAGE_THRESHOLD,
);
export const selectDeviceBluetoothId = createMemoizedSelector(