mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
fix(suite-native): propagate battery-level notifications to transport
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user