Skip to content

fix(dashpay): rekey isLocal consumers to the restored wallet-ownership semantics - #983

Merged
QuantumExplorer merged 1 commit into
developfrom
fix/islocal-consumer-semantics
Aug 12, 2026
Merged

fix(dashpay): rekey isLocal consumers to the restored wallet-ownership semantics#983
QuantumExplorer merged 1 commit into
developfrom
fix/islocal-consumer-semantics

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Aug 11, 2026

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Follow-up to #981. The SDK defines isLocal as mine-or-tracked (owner-decided semantics, dashpay/platform#4375): wallet-derived identities are always local, manual adds are local, and only incidental observed rows are false — promote-only, with a startup heal for stores written by the constant-false era that caused the original field bug (the wallet's own identity showing as not-local, hiding the key-refresh affordances).

This PR updates the three remaining app-side isLocal readers, written against the old dead "Local Only / On Network" badge reading:

  • Identities list badge — the orange "Local Only" badge (which would now appear on every wallet identity) becomes an "Observed" badge on the rare incidental rows.
  • Identity detail sheet — the always-on Status row is replaced by an "Observed" row shown only for incidental rows; the Wallet row already names the owner otherwise.
  • refreshFromNetwork — the !row.isLocal filter is dropped; it would have skipped exactly the wallet's own identities.

The key-refresh gates stay on the wallet relationship (#981) — that operation needs the wallet's DIP-9 tree specifically, which isLocal deliberately does not claim.

Ordering

Land/pull dashpay/platform#4375 first: until the SDK fix is in ../platform, rows still carry the constant false and every identity would show the "Observed" badge.

How Has This Been Tested?

Clean dashpay scheme simulator build (ARCHS=arm64). SDK-side behavior (promotion, promote-only discipline, heal, observed-entry mislink fixes) is covered by IdentityIsLocalPersistenceTests in the platform PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Identity details now clearly indicate when an identity is observed.
    • Identity lists display an “Observed” badge for identities detected from the network.
  • Bug Fixes

    • Active-wallet identities are now refreshed correctly from the network.
    • Local identities no longer display misleading status information.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 641120b0-9c79-4223-9d2b-b3446d6b6aeb

📥 Commits

Reviewing files that changed from the base of the PR and between 0964136 and ef8fc96.

📒 Files selected for processing (2)
  • DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesViewModel.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesViewModel.swift

📝 Walkthrough

Walkthrough

Identity labels now show “Observed” for non-local identities. The detail view omits status for local identities. Network refresh now processes all persisted identities.

Changes

Identity ownership and refresh

Layer / File(s) Summary
Refresh all persisted identities
DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesViewModel.swift
The network refresh loop now processes every persisted identity, including local identities.
Display identity ownership
DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesScreen.swift
Identity rows show an “Observed” badge for non-local identities. Detail views show “Status: Observed” only for non-local identities.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: romchornyi

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes updating isLocal consumers to match restored wallet-ownership semantics, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/islocal-consumer-semantics

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

@QuantumExplorer
QuantumExplorer force-pushed the fix/islocal-consumer-semantics branch 2 times, most recently from 0964136 to ccf5f85 Compare August 11, 2026 19:11
The SDK now defines isLocal as 'this identity is yours or deliberately
tracked here': wallet-derived identities are always local, manual adds
are local, and only incidental (observed) rows are false — with the
persister promoting on wallet linkage and a startup heal for the
constant-false era (dashpay/platform#4375).

Update the three app-side readers written against the old dead
'Local Only / On Network' badge reading:

- Identities list badge: the orange 'Local Only' badge (which would
  now appear on every wallet identity) becomes an 'Observed' badge on
  the rare incidental rows.
- Identity detail sheet: the always-on Status row is replaced by an
  'Observed' row shown only for incidental rows — the Wallet row
  already names the owner otherwise.
- refreshFromNetwork: drop the '!row.isLocal' filter, which would
  have skipped exactly the wallet's own identities.

The key-refresh gates stay on the wallet relationship (#981) — that
operation needs the wallet's DIP-9 tree specifically, which isLocal
deliberately does not claim.

Land/pull dashpay/platform#4375 first: until then rows still carry
the constant false and every identity shows the 'Observed' badge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@QuantumExplorer
QuantumExplorer force-pushed the fix/islocal-consumer-semantics branch from ccf5f85 to ef8fc96 Compare August 12, 2026 07:42
@QuantumExplorer
QuantumExplorer merged commit 3fcfb28 into develop Aug 12, 2026
4 checks passed
@QuantumExplorer
QuantumExplorer deleted the fix/islocal-consumer-semantics branch August 12, 2026 07:48
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