fix(ui): retire the menu's Join DashPay banner once a username exists#831
Merged
QuantumExplorer merged 1 commit intoJul 16, 2026
Merged
Conversation
CurrentUserProfileModel drove the More menu's Join DashPay banner off sync state alone (showJoinDashpay = state == .syncDone), so a wallet that already registered — or adopted a discovered identity — kept the "Request your username" call-to-action forever. Gate it on the DWGlobalOptions.dashpayUsername mirror too (the home banner's .registered check reads the same completion state), and re-evaluate on DWDashPayRegistrationStatusUpdated so it retires live. 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 |
4 tasks
QuantumExplorer
added a commit
that referenced
this pull request
Jul 16, 2026
…shPay retires (#837) The DWGlobalOptions.dashpayUsername mirror is written only by an on-device registration completion or the explicit Find-identities adoption. An identity that arrived any other way — synced in from Platform after a reinstall, or registered under an earlier build — left the mirror empty forever, so the More menu's Join DashPay banner (gated on the mirror since #831) kept offering "Request your username" to a wallet that already owns one. Two-part fix: - DWCurrentUserIdentityInfo.computeSnapshot backfills the mirror (username + registrationCompleted) whenever the SDK yields a real DPNS name and the mirror is empty, then posts the bridge state-change notification (async — the compute runs inside a lazy property read) so every mirror consumer re-keys. Only SDK-sourced names qualify; the pending-contested filter has already run, so a deferred contested registration cannot leak in. - CurrentUserProfileModel.updateShowJoinDashpay reads the SDK truth directly as well as the mirror, which both fixes the gate and triggers the backfill the moment the menu renders. Also renames the Sync Info menu's first row and screen header from "SwiftDashSDK SPV Status" to "Core Sync Status". 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
The More menu kept showing "Join DashPay — Request your username" on a wallet that already has a registered username (QA repro after registering + paying contacts).
Root cause:
CurrentUserProfileModel.showJoinDashpaywas derived from sync state alone (model.state == .syncDone) — it never checked whether the user is already registered, so once synced the banner showed forever. The home screen's banner does this correctly (joinDashPayState != .registered); the menu model predates that check.Fix: gate the banner on the
DWGlobalOptions.dashpayUsernamemirror as well (written by registration completion and by the Identities screen's discovered-identity adoption), and re-evaluate onDWDashPayRegistrationStatusUpdatedso it retires live when registration finishes while the menu is open.Test plan
dashpaysimulator build (arm64); installed on QA-iPhone16🤖 Generated with Claude Code