fix(offline): a wallet created in this session builds its Bluetooth transfer stack - #1044
Merged
Merged
Conversation
…ransfer stack Startup init builds the BluetoothManager and injects the frame coordinator and transport adapter into the bilateral handler only when an identity already exists. Wallet creation installed the full router but not that stack, so a phone that created its wallet in this app session paired over Bluetooth (a different path) yet answered every offline send with "the BLE stack is not live yet: Ble transport adapter not injected yet" until the app restarted. Seen on the rig on 2026-09-27; a restart was the only way through. The Android block moves out of init into build_ble_stack_for_identity(), which init still calls at the same point, and system.createGenesisV2 calls it once the new identity's router is up. A failure there rolls the genesis back like the router install before it does. cargo ndk -t arm64-v8a check -p dsm_sdk --features jni,bluetooth: clean (the code is Android-only). Android clippy reports no finding in either file. make lint: passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Startup init builds the BluetoothManager and injects the frame coordinator and transport adapter into the bilateral handler only when an identity already exists. Wallet creation installed the full router but not that stack, so a phone that created its wallet in this app session paired over Bluetooth (a different path) yet answered every offline send with
the BLE stack is not live yet: Ble transport adapter not injected yetuntil the app restarted. Seen on the rig on 2026-09-27, where a restart was the only way through to the first offline send proven on real Android devices.The Android block moves out of init into
build_ble_stack_for_identity(), which init still calls at the same point, andsystem.createGenesisV2calls it once the new identity's router is up. A failure there rolls the genesis back, like the router install before it.Verification
cargo ndk -t arm64-v8a check -p dsm_sdk --features jni,bluetooth: clean (the code is Android-only; host builds do not compile it). Android clippy reports no finding in either changed file.cargo check -p dsm_sdk --tests,make lint: pass.identity not ready … no BLE stack yet; wallet creation at 15:42:35 loggedthe BLE stack is liveandBLE coordinator and transport adapter injected into bilateral handler; contacts exchanged with the A54, faucet claimed, appliance connected, 20 ERA loaded offline, then 5 ERA sent offline to the A54:TRANSFER SEALED, sender offline 20→15. The A54 loggedfused anchor PINNED for 56JEAKND…andoffline-bearer release accepted (v2 predicate: σ^DSM+σ^chip+σ^host), balance 105→110. The A16's chip counter stepped 1→2.the BLE stack is not live yet: Ble transport adapter not injected yetuntil the app was restarted.