fix(dashpay): write contact alias/note/hidden through setDashPayContactInfo#834
Merged
QuantumExplorer merged 1 commit intoJul 16, 2026
Merged
Conversation
…ctInfo
The contact-settings sheet saved alias/note/hidden via the SDK's
EstablishedContact handle setters — which mutate a DETACHED FFI clone
(managed_identity_get_established_contact inserts a .cloned() copy into
the handle table). Nothing ever reached the wallet manager's contact
state, SwiftData, or Platform: the "Saved" toast covered a complete
no-op, which is why the QA sim's contactAlias/contactNote mirror
columns stayed empty after saving.
Rewire to the SDK's real write path, ManagedPlatformWallet
.setDashPayContactInfo — one combined alias+note+hidden write that
updates real wallet state, persists (feeding the SwiftData mirror the
contacts list, payment-row aliases, and storage explorer read), and
publishes the self-encrypted DIP-15 contactInfo document so the
metadata roams across devices ("remote wins" convergence). The publish
signs a Platform document with the identity key, so the write is now
PIN/biometric-gated like every other document write; a cancelled
prompt stays silent. The sheet sends its full current state on every
save (the document carries all three fields together).
The clone-mutating path (setAlias/setNote/setHidden +
mutateEstablishedContact and its resync-retry) is deleted; the setters
are deprecated SDK-side in platform PR #4140.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2 tasks
QuantumExplorer
added a commit
that referenced
this pull request
Jul 16, 2026
Verified 2026-07-17 (dashpay arm64-sim green at app tip 1f195c6): picks up platform #4139 (partial-amount withdrawal wrapper — the last app-required surface that lived only on a local sidecar branch) and #4140 (EstablishedContact clone-setter removal, requiring app tip >= #834's setDashPayContactInfo rewire). The v4.1-dev-local sidecar branch is retired alongside the long-gone integration branch. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Saving a contact's alias/note (or hiding a contact) was a complete no-op behind a "Saved" toast. QA evidence: after saving an alias, the
contactAlias/contactNotemirror columns in SwiftData stayed empty.Root cause (SDK-side): the sheet was wired to
EstablishedContact.setAlias/setNote/hide, which mutate a detached FFI clone —managed_identity_get_established_contactinserts a.cloned()copy into the handle table, so the mutation never reaches the wallet manager's contact state, is never persisted, and is lost when the handle is freed. (The earlier resync-retry fix on this path cured the lookup failure but couldn't cure the phantom write.)Fix: rewire to the SDK's real write path —
ManagedPlatformWallet.setDashPayContactInfo→set_contact_info_with_external_signer, which:contactInfodocument so alias/note/hidden roam across devices (outcome: published / deferred-until-2-contacts / skipped-watch-only).Changes:
setContactMeta(alias:note:hidden:for:)replaces the three per-field setters (the document carries all three together; the sheet sends its full current state on every save).mutateEstablishedContact+ resync-retry) is deleted.Companion: platform#4140 deprecates the clone setters SDK-side so they can't be re-wired.
Test plan
dashpaysimulator build (arm64); installed on QA-iPhone16contactAliasmirror column non-empty (storage explorer → Contact Requests → detail) and payment rows read "Sent to "🤖 Generated with Claude Code