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.

thepastaclaw and others added 2 commits July 5, 2026 14:32
…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...3` (IdentityRegistration / IdentityTopUp /
IdentityTopUpNotBound / IdentityInvitation) in
`crossWalletResumableLocks` before the status and anti-join
gates. Address-flow locks stay on
`PendingPlatformFundFromAssetLocksList`, their proper surface.

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`: address /
shielded-address top-ups are rejected, each of `fundingTypeRaw`
0...3 is accepted, and unknown discriminators default to reject.

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 also excludes non-identity
funding types (0...3 only) and 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>
@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: 38ca6f20-1818-4c9e-abe6-3400f3887d60

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.

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