Skip to content

fix: stabilize Electron BLE discovery and Android pairing - #925

Merged
wabicai merged 6 commits into
onekeyfrom
fix/electron-ble-scan-cache
Sep 9, 2026
Merged

wabicai merged 6 commits into
onekeyfrom
fix/electron-ble-scan-cache

Conversation

@wabicai

@wabicai wabicai commented Sep 8, 2026

Copy link
Copy Markdown
Member

Electron BLE polling could drop wallets between scan windows. Retain discoveries across polling windows, while refreshing disconnected peripherals through the existing cold-connection path before reconnecting. Active connections remain reusable, and Protocol V2 probe timeouts remain distinct from stale pairing errors.

Restore Android bonding before GATT setup and make the pending bond wait cancellable during transport shutdown. Stopping now removes the bond listener and deadline without waiting up to 60 seconds. Keep failure reasons separate: missing native reasons are unknown, while SDK pairing deadlines are timeouts without automatic retry.

Publish SDK packages as 1.2.2-alpha.109 on npm next. Keep @onekeyfe/react-native-ble-utils pinned to 0.1.6.

Validation:

  • Focused React Native and Electron regressions: 70 tests passed, including V1/V2 stop during unresolved bonding and fresh cold connections for retained Pro/Pro2 discoveries.
  • yarn agent:check --profile commit passed affected package tests and builds.
  • yarn agent:check --profile pr passed on Node 22: version alignment, full lint, tests in 20 packages, and builds in 33 packages.
  • npm publication succeeded; all 25 public packages match the release commit and next tag. React Native and Electron tarball integrity and compiled fixes were verified.

@wabicai wabicai changed the title fix: retain Electron BLE scan results and preserve probe errors fix: stabilize Electron BLE discovery and Android pairing Sep 8, 2026
@sidmorizon

Copy link
Copy Markdown
Contributor

@codex review

@sidmorizon

Copy link
Copy Markdown
Contributor

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T14:02:53.705912Z 962db9e Manual request
🔒 Security Review Completed 2026-09-08T14:07:57.416210Z 962db9e Manual request

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sidmorizon

Copy link
Copy Markdown
Contributor

Comment thread packages/hd-transport-electron/src/noble-ble-handler.ts
Comment thread packages/hd-transport-react-native/src/index.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 962db9ecea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/hd-transport-react-native/src/index.ts Outdated
Comment thread packages/hd-transport-electron/src/noble-ble-handler.ts
Comment thread packages/hd-transport-web-device/src/electron-ble-transport.ts
Comment thread packages/hd-transport-react-native/src/index.ts Outdated
Comment thread packages/hd-transport-react-native/src/index.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 962db9ecea

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread packages/hd-transport-electron/src/noble-ble-handler.ts
Comment thread packages/hd-transport-electron/src/noble-ble-handler.ts
@wabicai
wabicai merged commit 9d5a66a into onekey Sep 9, 2026
14 checks passed
@wabicai
wabicai deleted the fix/electron-ble-scan-cache branch September 9, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants