Skip to content

Commit 01835e8

Browse files
committed
fix: Bluetooth permission
1 parent 10c6b94 commit 01835e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/hd-transport-electron/src/noble-ble-handler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ async function initializeNoble(): Promise<void> {
251251
return;
252252
}
253253

254+
// Setup persistent state listener before initialization
255+
setupPersistentStateListener();
256+
254257
const timeout = setTimeout(() => {
255258
reject(
256259
ERRORS.TypedError(HardwareErrorCode.RuntimeError, 'Bluetooth initialization timeout')
@@ -290,9 +293,6 @@ async function initializeNoble(): Promise<void> {
290293
handleDeviceDiscovered(peripheral);
291294
});
292295

293-
// Setup persistent state listener after initialization
294-
setupPersistentStateListener();
295-
296296
logger?.info('[NobleBLE] Noble initialized successfully');
297297
} catch (error) {
298298
logger?.error('[NobleBLE] Failed to initialize Noble:', error);

0 commit comments

Comments
 (0)