Skip to content

docs(swift-example-app): add multi-wallet test cases (Core + Platform) to iOS test plan#3888

Merged
QuantumExplorer merged 6 commits into
v3.1-devfrom
claude/ios-test-plan-multiwallet
Jun 13, 2026
Merged

docs(swift-example-app): add multi-wallet test cases (Core + Platform) to iOS test plan#3888
QuantumExplorer merged 6 commits into
v3.1-devfrom
claude/ios-test-plan-multiwallet

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Jun 13, 2026

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Follow-up to #3887. The original iOS TEST_PLAN.md only captured multiple HD accounts within a single wallet (CORE-09) — it missed the multi-wallet dimension entirely (multiple wallets coexisting on one device/network), even though SwiftExampleApp is a full multi-wallet client (PlatformWalletManager holds N wallets keyed by wallet_id, one SPV runtime per network).

What was done?

Two clusters added, both verified against the app UI + FFI.

Wallet-lifecycle multi-wallet (CORE-14..CORE-21, in §4.1)

Hold/list multiple wallets, create/import a second, switch active wallet (navigation-based; no global picker), delete a wallet (cascades Keychain + identities + SwiftData), per-wallet isolation, send between two on-device wallets, concurrent SPV sync across wallets, concurrent shielded-pool binding. Also disambiguated CORE-09 (accounts vs wallets).

Platform on-device counterparty scenarios (MW-01..MW-10, new §4.13, Domain=MultiWallet)

Interactions where both sides are wallets on the same device & network, so a full round-trip is verifiable locally:

ID Scenario Tier
MW-01 Credit transfer between two on-device identities Thorough
MW-02 Token transfer between two on-device identities Thorough
MW-03 DashPay request → accept → payment, both endpoints local Thorough
MW-04 Document transfer / purchase across wallets Uncommon
MW-05 Contested DPNS race between two on-device identities Uncommon
MW-06 Shielded transfer between two on-device wallets Thorough
MW-07 Unshield from A to a Platform address owned by B Uncommon
MW-08 Platform balance sync is per-active-wallet, not concurrent Thorough
MW-09 Per-wallet Platform isolation (identities/usernames/tokens/contacts) Thorough
MW-10 Same identity restored into two wallets (duplicate seed) Uncommon

MW-08 documents a real asymmetry found in the code: Core SPV syncs all wallets at once (CORE-20), but PlatformBalanceSyncService is configured per active wallet (configure(...walletId:), re-run on switch), so a second wallet's Platform balances can be stale until you switch to it.

Multi-wallet is a power-user / QA topology, not an everyday flow, so none of these are Essential or Common — routine ops are Thorough and destructive/exotic ones (delete wallet, concurrent shielded bind, doc transfer/purchase, duplicate-seed) are Uncommon. Summary matrix updated: Essential 22 · Common 29 · Thorough 35 · Uncommon 21 (107 runnable); Core 16, Platform ~71, Shielded 13.

How Has This Been Tested?

Documentation only. Status of each row verified by reading the wallet UI (WalletsContentView, WalletDetailView, CreateWalletView), PlatformWalletManager, PlatformBalanceSyncService, ShieldedService, and the platform_wallet_manager_* FFI (per-wallet_id keying, manager-global SPV vs per-wallet platform balance sync).

Breaking Changes

None. Documentation only.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@QuantumExplorer, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 4 minutes and 51 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5177f526-7bcb-45ca-9425-cf853793b6f3

📥 Commits

Reviewing files that changed from the base of the PR and between 56a3c88 and 666a502.

📒 Files selected for processing (1)
  • packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md
📝 Walkthrough

Walkthrough

Updates the Swift example app test plan by adjusting the Thorough tier legend, clarifying Core/Wallet entries around single-wallet versus multi-wallet coverage, and recalculating summary matrix totals for tiers and layers.

Changes

Swift test plan documentation

Layer / File(s) Summary
Legend and wallet catalog updates
packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md
The Thorough tier legend row is adjusted, and CORE-09 through CORE-21 wallet catalog text is revised to clarify multiple HD accounts within one wallet versus multi-wallet scenarios.
Summary matrix recount
packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md
Runnable totals in the summary matrix are recomputed for tiers and layers, including changes to Thorough, Uncommon, Core, and Shielded counts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • dashpay/platform#3887: Also updates packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md, making closely related test-plan catalog changes.

Suggested reviewers

  • shumkov
  • llbartekll
  • ZocoLini

Poem

🐇 I nibbled through a testing chart,
And tuned each wallet-themed small part.
One legend hopped, counts found their seat,
The matrix now looks trim and neat.
With carrot ink, the plan’s complete.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding multi-wallet test cases (CORE-14 through CORE-21) to the iOS test plan, and clarifying CORE-09 for single-wallet HD accounts versus multi-wallet operations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ios-test-plan-multiwallet

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 and usage tips.

The initial plan only covered multiple HD accounts within a single
wallet (CORE-09); it missed the multi-wallet dimension entirely, even
though the app is a full multi-wallet client (PlatformWalletManager
holds N wallets keyed by wallet_id, one SPV runtime per network).

Add CORE-14..CORE-21 covering: holding/listing multiple wallets,
creating/importing a second wallet, switching the active wallet,
deleting a wallet (cascade), per-wallet isolation, sending between two
on-device wallets, concurrent SPV sync across wallets, and concurrent
shielded-pool binding. Disambiguate CORE-09 (accounts vs wallets).

Multi-wallet is not part of the every-user core experience, so none of
these are Essential or Common: routine multi-wallet ops are Thorough and
the destructive/exotic ones (delete wallet, concurrent shielded bind)
are Uncommon. Matrix updated (Common 29, Thorough 29, Uncommon 17;
Core 16, Shielded 11).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@QuantumExplorer
QuantumExplorer force-pushed the claude/ios-test-plan-multiwallet branch from 2787ebd to 56a3c88 Compare June 13, 2026 22:53
Add §4.13 (Domain=MultiWallet, MW-01..MW-10): Platform/shielded
interactions where both counterparties are wallets on the same device
and network, so a full round-trip is verifiable locally without an
external party. Covers credit/token transfer between two on-device
identities, a full DashPay request->accept->pay loop, document
transfer/purchase across wallets, a contested-DPNS race, shielded
transfer/unshield between wallets, per-wallet Platform isolation, and
the duplicate-seed case.

Also documents a real asymmetry: Core SPV syncs all wallets at once
(CORE-20) but PlatformBalanceSyncService is configured per active wallet
(MW-08), so a second wallet's Platform balances can be stale until you
switch to it. All multi-wallet rows are Thorough/Uncommon. Matrix:
Thorough 35, Uncommon 21 (107 runnable); Platform ~71, Shielded 13.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer changed the title docs(swift-example-app): add multi-wallet test cases to iOS test plan docs(swift-example-app): add multi-wallet test cases (Core + Platform) to iOS test plan Jun 13, 2026
QuantumExplorer and others added 4 commits June 14, 2026 01:00
Add CORE-22 (re-add a previously deleted wallet on the same network) and
CORE-23 (re-add a deleted wallet that also exists on another network),
both Uncommon. CORE-23 exercises the cross-network mnemonic-purge guard:
wallet_ids are network-scoped (same mnemonic -> distinct id per network,
each with its own Keychain mnemonic copy), and deleteWallet only purges
the phrase when walletRowCountAcrossNetworks == 0, so deleting on one
network must not orphan the sibling on another. Matrix: Uncommon 23
(109 runnable), Core 18.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Audit of the shielded surface surfaced three gaps:
- SH-12: Clear shielded state (real "Clear" button on the Sync tab ->
  clearShielded; wipes all wallets' notes + sync state, keeps bind creds
  for Sync-Now re-scan). Uncommon.
- SH-13: no proper shielded receive-address UI. Address is derivable
  (shieldedDefaultAddress + DashAddress.encodeShielded) but only shown
  truncated/non-copyable; no copy/QR receive screen. Thorough, marked
  SDK-only; complicates cross-device receive and MW-06 setup.
- MW-11: shielded withdraw from A to B's Core L1 address, completing the
  cross-wallet shielded exit set (shielded MW-06 / Platform MW-07 /
  Core MW-11). Uncommon.

All six shielded transition types (15-20) and the operational set
(sync, view, prover, seed, clear, receive-addr) are now accounted for.
Matrix: Uncommon 25 (111 runnable), Shielded 15.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Correction: the app DOES have a polished shielded receive screen — the
unified "Receive Dash" sheet (ReceiveAddressView) has Core / Platform /
Shielded tabs, each with QR + full bech32m address + Copy. Re-classify
SH-13 from SDK-only gap to FULLY IMPLEMENTED (Common) and drop the
"no copy/QR UI" caveat from MW-06.

The same view also exposes a Platform receive address tab that wasn't
captured — add ADDR-06 (Display / share your Platform receive address,
Common). Matrix: Common 31 (113 runnable); Platform ~72, Shielded 16.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make feature category a first-class, queryable filter axis (Token,
Shielded, Identity, ...) alongside Tier/Layer/Status, so requests like
"run all non-Uncommon Token tests" resolve directly. A row's primary
category is its §4 section; cross-cutting tests (e.g. MW-02 token
transfer between wallets, CORE-21 multi-wallet shielded bind) are
captured in a new §6 Category index that lists every member id per
category. Updates the selection grammar (Domain -> Category) and adds
worked examples for the Token and Shielded category queries.

Co-Authored-By: Claude Opus 4.8 (1M context) <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