fix: backport App 6.5.2 wallet compatibility in SDK 1.2.2 - #926
Open
wabicai wants to merge 2 commits into
Open
Conversation
wabicai
marked this pull request as ready for review
September 9, 2026 08:37
originalix
reviewed
Sep 9, 2026
| markWalletStatusRefreshed | ||
| ); | ||
| if (keepAttachPin && device.features) { | ||
| device.features.unlockedAttachPin = true; |
Contributor
There was a problem hiding this comment.
P1: [Persist the Attach PIN logical context]
When a current Attach PIN wallet requests Cardano, AskPassphrase refreshes firmware status after unlocked_by_attach_to_pin has been cleared. This assignment writes the replacement marker through device.features, but features is a projected compatibility object, not the canonical device state.
OpenWalletSession then reads getDeviceState() and sees unlockedAttachPin === false, so the same Attach PIN + Cardano flow is rejected with DeviceCheckUnlockTypeError. Persist this logical Attach PIN context in durable session/state data that OpenWalletSession consumes after the status refresh, and add a public openWalletSession regression test for this path.
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.
App
release/v6.5.2pins Hardware SDK1.2.1. Its Protocol V2 wallet flow sendsseed_domainsonDeviceSessionGet, while current firmware generates domains throughDeviceSessionAskPassphrase. It also repeats Main PIN selection for an already unlocked standard wallet when passphrase protection is disabled.This backport prepares SDK 1.2.2 for the App 6.5.2 hot update with two focused fixes:
[Standard]or[Standard, Cardano]onDeviceSessionAskPassphrase, read generated domains fromDeviceSession, and supplement Cardano only when needed. Preserve wallet identity checks and Attach PIN context during derivation.Base:
release/app-6.5.2-sdk-1.2.1, fixed at SDK tagv1.2.1(43d2856e5). Selected upstream wallet-session changes come fromfd5df217b(#903),9ed2a6893, and9dc765a64; unrelated upstream changes are excluded.The implementation changes one Core source file, three generated schema/type outputs, three existing test files, and the existing wallet-session documentation. The release preparation aligns all 30 SDK package versions and their existing 1.2.1 internal references to 1.2.2, following the previous release's manifest scope, with the four existing example manifests kept in sync. Public wallet parameters (including
deriveCardanoandresume-hidden), UI event contracts, Protocol V1, third-party dependencies, transport implementations, and firmware submodule pointers remain unchanged.Protobuf outputs were regenerated with
yarn update-protobufusing the SDK 1.2.1 firmware schema snapshot (723bf8bab4) with onlymessages_device_session.prototaken from firmware commitf83f38bb6b. This limits the generated diff to the three wallet-session field changes without moving the submodule pointer.Validation for the 1.2.2 preparation:
yarn check-versions: passed; all 30 SDK packages are at 1.2.2.yarn agent:check --profile commit: passed after building the private Trezor packages in dependency order; 2,395 tests passed across 174 suites (4 tests skipped), and all 30 package builds passed.yarn agent:check --profile pr: passed, including full repository lint, tests, and build.release/v6.5.2installed these local tarballs with its release dependencies; postinstall/web-embed build andyarn agent:check --profile commit(including App TypeScript) passed. Temporary local package resolutions were removed after validation.SDK 1.2.2 has not been published to npm. Publication is explicitly on hold for validation. Physical-device validation has not been performed. The companion App dependency PR, OneKeyHQ/app-monorepo#13275, remains draft until the SDK is approved and published, its registry lockfile is updated, and device validation is complete.