Skip to content

fix(swift-example-app): gate identity resumes by funding type#4015

Draft
thepastaclaw wants to merge 2 commits into
dashpay:v4.1-devfrom
thepastaclaw:tracker-1809-identity-lock-filter
Draft

fix(swift-example-app): gate identity resumes by funding type#4015
thepastaclaw wants to merge 2 commits into
dashpay:v4.1-devfrom
thepastaclaw:tracker-1809-identity-lock-filter

Conversation

@thepastaclaw

Copy link
Copy Markdown
Collaborator

Follow-up to #4010. That PR was merged before the automated review landed; the review found that the Resumable Registrations list could expose address-funding asset locks to the identity registration resume path.

What changed

  • Add fundingTypeRaw to the resumable-lock filter contract.
  • Reject non-identity funding types before a lock can reach CreateIdentityView(preselectedAssetLock:).
  • Keep identity funding types 0...3 resumable and add focused regression coverage for 4/5 and unknown discriminators.
  • Refresh stale Broadcast/Consumed docs now that every resumable row renders Resume.

Validation

  • swiftc -parse packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Views/IdentitiesContentView.swift packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Views/CreateIdentityView.swift packages/swift-sdk/SwiftExampleApp/SwiftExampleAppTests/CreateIdentityResumableTests.swift
  • git diff --check upstream/v4.1-dev..HEAD
  • git show --check --stat HEAD

Created from tracker issue thepastaclaw/tracker#1809.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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: c03c18c0-8346-490e-a6d0-8eabb8c87aff

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

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.

thepastaclaw and others added 2 commits July 15, 2026 01:25
…ing types

The Identities-tab Resumable Registrations surface filtered
`PersistentAssetLock` rows on `statusRaw` and the per-slot
anti-join alone. Every asset lock on the active network was in
scope — including `fundingTypeRaw == 4` (AssetLockAddressTopUp)
and `5` (AssetLockShieldedAddressTopUp), whose scripts commit to
an address-flow recipient. Tapping Resume on one of those rows
routed the lock into `CreateIdentityView(preselectedAssetLock:)`
and would fire an IdentityCreate the user never intended.

Add `fundingTypeRaw` to `AssetLockResumeRow` and require
`0...2` (IdentityRegistration / IdentityTopUp /
IdentityTopUpNotBound) in `crossWalletResumableLocks` before the
status and anti-join gates. Invitation vouchers (3) remain
reserved for the explicit reclaim flow, while address-flow locks
(4 and 5) stay on their proper surfaces.

Also refresh stale docs/comments that still described Broadcast
rows as spinner-only and Consumed as perpetual-spinner — PR dashpay#4010
made every resumable row a Resume button.

Regression coverage in `CreateIdentityResumableTests` accepts
funding types 0...2 and rejects invitation, address, shielded-
address, negative, and unknown discriminators fail-closed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…able filter

The `allAssetLocks` @query comment predates the current
`crossWalletResumableLocks` shape and still described the filter
as "status >= InstantSendLocked". The floor is actually `>= 1`
(Broadcast), and the filter now admits only generic identity-
resume funding types 0...2 and excludes in-flight controller
slots. Bring the docstring in line so future readers don't work
off the old contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thepastaclaw thepastaclaw force-pushed the tracker-1809-identity-lock-filter branch from a81cae4 to 9894f56 Compare July 15, 2026 06:25
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