Repository navigation
feat(history): show shielded-pool activity in the Home history - #1690
Draft
HashEngineering wants to merge 9 commits into
Draft
HashEngineering wants to merge 9 commits into
HashEngineering wants to merge 9 commits into
Conversation
A username paid from the shielded pool, a shielded send or an unshield to a Platform address creates no Core transaction, so the Home history had no row for it and the balance drop was unexplained (QA D-19T1-05). Add one tx_display_cache row per SDK shielded_activities entry that has no Core transaction of its own (Room 22 -> 23 adds a `source` column). The value is the entry's effect on the Home total (L1 + shielded): outgoing kinds show amount + fee, so the username row reads -0.03. ShieldFromAssetLock and Withdrawal are skipped because their Core transaction already has an L1 row; ShieldedSpend (self-change, fee unknown) and outgoing entries without a known fee get no row rather than a wrong amount. L1 writers now clear and count L1 rows only. ShieldedHistoryRowSync collects the activity feed on IO, replaces the shielded rows in one transaction, ignores the not-ready state, and stops for a wallet wipe. Tapping a shielded row opens the transaction detail sheet with the type, amount, fee, date, status, From/To balances and memo. Platform address and Identity credit history are deferred: the SDK keeps only their current balances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…name The DashPay welcome disclaimer said "You have 0.00000737 Dash" (the transparent balance) on a wallet about to pay the username from its shielded balance. Quote the shielded balance when the fee will be paid from the shielded pool; otherwise keep the transparent balance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A withdrawal to a foreign Core address now gets a "Sent" row; only a withdrawal to this wallet's own Core address is left to its L1 row. An unresolvable payout gets no row rather than risk a double count. - An unshield to someone else's Platform address and a top-up of someone else's identity read "Sent" instead of an internal move to the user's own balance. Ownership is resolved against the snapshot's wallet; an unknown owner falls back to the neutral "Sent". - The detail sheet follows the entry in the live feed, so it updates on settlement and closes when the entry fails or the wallet changes. - A failed cache write goes through the feed's retry path instead of waiting for the next activity change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A failed SDK read while resolving who a shielded payout went to now fails the whole sync pass before anything is written and retries, so existing rows are kept. Only an undecodable payout stays "unknown". The detail sheet keeps its last detail and retries on such a failure. - A withdrawal to this wallet's own Core address shows as "Unshielded" until the wallet holds a Core output paying that address; only then is it left to its L1 row. The sync also re-plans on Core history changes (DisplayCacheRefreshBus, debounced), and an unchanged plan writes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Contributor
|
🕓 Review not started yet because this PR is a draft.
Commit c35f177. Normal review starts when eligible; priority review starts as soon as a slot is available. |
…ry-rows Picks up cac4f5c (phase-1 through #1675, #1677/#1678/#1680, int37 pin). Conflicts resolved by keeping both sides: - AppDatabaseMigrations: our 22->23 tx_display_cache.source migration plus the base's data-only removeCrowdNodeCacheRows callback (base stays at v22, so AppDatabase is v23 with 23.json unchanged). - PlatformSyncService: both shieldedHistoryRowSync and transparentUsernameCreation constructor params; the six platform tests and IdentityConditionalWriteTest pass both. - DatabaseMigrationTest: our migrate22to23 plus the base's crowdnode cache tests; its migrations array now includes migration22to23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- replaceShieldedRows compares and writes in one transaction: one read, nothing written when the plan is unchanged, only new or changed rows upserted. - ShieldedActivityEntry derives pending and amount from status and amountCredits. - signedTotalDuffs returns a sealed result; ShieldedKindSpec carries isSend; the test-only planShieldedHistoryRow wrapper is gone. - Core script decoding uses dashj via TxInfoConverter.standardAddressOf (exact 25/23-byte templates only), replacing CoreAddressVersions. - TransactionResultViewBinder shares one bindHeader, and the icon table lives in TxDisplayCacheEntry.iconResFor. - TxDisplayCacheDao queries name SOURCE_L1 / SOURCE_SHIELDED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ty-history-rows-469904
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.
Stacked on #1683 (
feat/advanced-internal-transfer).Problem
QA D-19T1-05: registering a username paid from the shielded pool spends 0.03 DASH with no Core transaction, so Home history shows nothing and the shielded balance drops unexplained. The DashPay welcome disclaimer also quoted the transparent balance ("You have 0.00000737 Dash") on a wallet about to pay from shielded.
What changes
tx_display_cacherow per SDKshielded_activitiesentry that has no Core transaction of its own. Room 22 → 23 adds asourcecolumn (0 = L1, 1 = shielded). L1 writers now clear and count L1 rows only; the wallet wipe still clears everything.ShieldedHistoryRowSyncre-plans on shielded activity changes and on Core history changes (debounced). It replaces the shielded rows in one transaction and stops for a wallet wipe. A failed read or write writes nothing and retries.Deferred (no SDK data)
Known limits
Testing
:wallet:compile_testNet3DebugKotlinpasses.ShieldedHistoryRowsTest,ShieldedHistoryRowSyncTest,ShieldedHistoryRowSyncRetryTest,PlatformActivityDetailFeedTest,AppDatabaseMigration22to23Test(real Room, from schema 22),UsernameDisclaimerBalanceTest.ShieldedBalanceServiceTest,TxDisplayCache*,AssetLockKindResolver*.de.schildbach.wallet.service.platform.*(2,425 tests) last ran on the first commit, before the review fixes.DatabaseMigrationTest, but not run: androidTest does not compile at the base, for unrelated reasons.Local pre-review
🤖 Generated with Claude Code