Skip to content

fix(ui): retire the menu's Join DashPay banner once a username exists#831

Merged
QuantumExplorer merged 1 commit into
swift-sdk-integrationfrom
fix/menu-join-dashpay-registered
Jul 16, 2026
Merged

fix(ui): retire the menu's Join DashPay banner once a username exists#831
QuantumExplorer merged 1 commit into
swift-sdk-integrationfrom
fix/menu-join-dashpay-registered

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

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.showJoinDashpay was 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.dashpayUsername mirror as well (written by registration completion and by the Identities screen's discovered-identity adoption), and re-evaluate on DWDashPayRegistrationStatusUpdated so it retires live when registration finishes while the menu is open.

Test plan

  • Clean dashpay simulator build (arm64); installed on QA-iPhone16
  • Registered wallet: More menu shows no Join DashPay banner
  • Unregistered wallet: banner still appears once synced

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cdfa4b1c-4dab-4c17-af1c-95b07f09db4f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/menu-join-dashpay-registered

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@QuantumExplorer
QuantumExplorer merged commit 57ceead into swift-sdk-integration Jul 16, 2026
2 checks passed
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>
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.

1 participant