fix(swift-example-app): gate identity resumes by funding type#4015
Draft
thepastaclaw wants to merge 2 commits into
Draft
fix(swift-example-app): gate identity resumes by funding type#4015thepastaclaw wants to merge 2 commits into
thepastaclaw wants to merge 2 commits into
Conversation
…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>
Contributor
|
Important Review skippedDraft detected. 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 |
6 tasks
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.
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
Validation
Created from tracker issue thepastaclaw/tracker#1809.