Skip to content

feat(wallet): multi-select transaction filter with Rewards and Shielded categories - #793

Merged
QuantumExplorer merged 3 commits into
swift-sdk-integrationfrom
claude/transactions-filter-rewards-9811b7
Jul 9, 2026
Merged

QuantumExplorer merged 3 commits into
swift-sdk-integrationfrom
claude/transactions-filter-rewards-9811b7

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

What

Reworks the home-screen transaction filter (All / Sent / Received / Gift card) into multi-select checkboxes, and adds three new categories: Rewards, Shielded sent, and Shielded received.

Each row has a checkbox plus an Only button that narrows the selection to just that category. Tapping All checks every box. The sheet stays open while toggling and the list filters live; the last checked box can't be unchecked, so the filter never goes empty.

Semantics

  • Union filtering: a transaction shows when it matches any checked category.
  • A fully checked selection means "All" and also shows transactions that fit no category (internal transfers, CoinJoin mixing groups) — same as the old All mode.
  • Rewards (coinbase) are carved out of Received, as before; gift-card purchases still overlap with Sent.

Rewards

The .rewards predicate existed in HomeTxDisplayMode but was never surfaced in the dialog. The row now appears only when the wallet has ever had a masternode/mining reward: each full reload scans the unfiltered history for a coinbase tx (hasRewardsHistory), and a coinbase arriving incrementally unlocks the row without waiting for a reload.

Shielded categories

  • Shielded sent — the existing isShieldedTransfer classification (L1 funding tx of a to-Shielded transfer).
  • Shielded received — new ShieldedWithdrawalStore: the SDK's shieldedWithdraw is opaque (no txid returned), so ShieldedTransferCoordinator.performWithdraw records the destination Core address (on success and on the may-already-be-on-chain shieldedSpendUnconfirmed error), and an incoming tx paying a recorded address classifies as Shielded received. Receive addresses are single-use in practice, so address tagging is reliable. Store mirrors CoinJoinWithdrawalStore (per-wallet UserDefaults, NSLock cache) with the same remove/wipe hooks in SwiftDashSDKWalletWiper.

Masternode category

A Masternode row matches any masternode special transaction (provider registration, update registrar/service, revocation) via the SDK's typed discriminant. Like Rewards, it appears only when the wallet has ever had such a transaction, and masternode txs are carved out of Sent/Received into their own exclusive category.

Notes

  • Withdrawals performed before this change have no recorded address and keep showing under plain Received.
  • Filter selection still resets to All on relaunch (unchanged behavior).
  • Removes the unused ObjC TransactionFilterDialogPresenter and the single-select HomeTxDisplayMode.
  • New strings: "Rewards", "Shielded sent", "Shielded received", "Only".

Verification

  • Clean dashpay scheme build (iphonesimulator, ARCHS=arm64).
  • Testnet smoke of the filter sheet still pending (no simulator session in this environment) — worth checking the Only buttons and sheet height with/without the Rewards row.

🤖 Generated with Claude Code

…ed categories

The home screen filter becomes multi-select checkboxes with an "Only"
shortcut per row; the All row checks every box, and a fully checked
selection shows everything (including internal transfers and CoinJoin
mixing groups). Union semantics otherwise: a tx shows when it matches
any checked category.

- Rewards row (coinbase txs — the predicate already existed but was
  never surfaced) appears only when the wallet has ever earned a
  masternode/mining reward, computed from the unfiltered history on
  each reload and unlocked live when a coinbase arrives mid-session.
- Shielded sent classifies via the existing isShieldedTransfer
  (to-Shielded funding tx).
- Shielded received needs new plumbing: the SDK's shieldedWithdraw
  returns no txid, so ShieldedWithdrawalStore records the destination
  Core address at withdraw time (also on the may-be-on-chain
  shieldedSpendUnconfirmed error) and an incoming tx paying a recorded
  address classifies as Shielded received. Per-wallet UserDefaults,
  mirroring CoinJoinWithdrawalStore, with the same wallet-remove and
  full-wipe hooks.
- Drops the unused ObjC TransactionFilterDialogPresenter and the
  single-select HomeTxDisplayMode.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: 346f88aa-ff94-433f-a687-dd9b46db13d8

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
  • Commit unit tests in branch claude/transactions-filter-rewards-9811b7

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.

QuantumExplorer and others added 2 commits July 10, 2026 04:54
…de/transactions-filter-rewards-9811b7

# Conflicts:
#	DashWallet/Sources/UI/Home/Views/HomeViewModel.swift
Matches any masternode special transaction (provider registration,
update registrar/service, revocation) via the SDK's typed discriminant.
Like Rewards, the row is offered only when the wallet has ever had such
a transaction, and masternode txs are carved out of Sent/Received into
their own exclusive category.

Co-Authored-By: Claude Fable 5 <[email protected]>

@QuantumExplorer QuantumExplorer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self Reviewed

@QuantumExplorer
QuantumExplorer merged commit 0108878 into swift-sdk-integration Jul 9, 2026
2 checks passed
@QuantumExplorer
QuantumExplorer deleted the claude/transactions-filter-rewards-9811b7 branch August 7, 2026 08:22
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