Skip to content

feat: replace history placeholder with shared activity store - #235

Merged
truthixify merged 5 commits into
wraith-protocol:developfrom
legend-esc:feat/history-activity-store
Oct 23, 2026
Merged

truthixify merged 5 commits into
wraith-protocol:developfrom
legend-esc:feat/history-activity-store

Conversation

@legend-esc

Copy link
Copy Markdown
Contributor

Summary

Replace the /history placeholder ("History coming soon") with a functional activity history page backed by the shared activityStore.

Changes

  • src/pages/History.tsx: rewrote to read entries from useActivityStore, render each via ActivityRow, and support empty/pending/failed/confirmed states with chain/type/status filters.
  • src/stores/activityStore.ts: added clearAll() to clear all history entries.
  • src/App.tsx: routed /history to History (previously shared the Activity page).

Details

  • Renders chain, status, amount, timestamp, and explorer links per entry.
  • Supports empty, pending, failed, and confirmed states.
  • Exports (CSV/JSON) deliberately omit metadata so private key/memo material is never exposed.

Verification

  • tsc --noEmit: clean
  • prettier --check: clean
  • vitest run: 338/338 passing
  • vite build: passing

Closes #218

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@legend-esc is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@legend-esc Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This regresses the privacy scoping already present in Activity.tsx. The new History page reads and renders every persisted entry without requiring a connected wallet or filtering by entry.wallet, and its exportEntries value is built from all entries rather than filteredEntries. Switching wallets can therefore reveal and export another wallet/profile's history. Reuse the existing Activity page or preserve its connected-wallet scope, export only the filtered scoped entries after removing metadata, and add cross-wallet isolation tests.

- Require a connected wallet address before rendering any entries;
  disconnected state shows a prompt matching Activity.tsx
- Introduce walletEntries filtered by entry.wallet === address so
  chain/kind/status filters only operate on the current wallet's data
- Derive exportEntries from filteredEntries (not raw entries) and strip
  metadata, preventing cross-wallet leakage in CSV/JSON downloads
- Replace clearAll() with clearHistory(chain, address) so clearing is
  scoped to the connected wallet
- Add History.test.ts with 7 cross-wallet isolation tests covering view
  scoping, wallet-switch isolation, null-address guard, export scoping,
  metadata stripping, and scoped clearHistory
@legend-esc

Copy link
Copy Markdown
Contributor Author

This regresses the privacy scoping already present in Activity.tsx. The new History page reads and renders every persisted entry without requiring a connected wallet or filtering by entry.wallet, and its exportEntries value is built from all entries rather than filteredEntries. Switching wallets can therefore reveal and export another wallet/profile's history. Reuse the existing Activity page or preserve its connected-wallet scope, export only the filtered scoped entries after removing metadata, and add cross-wallet isolation tests.

Done, Please Review

@legend-esc
legend-esc requested a review from truthixify October 22, 2026 10:52

@truthixify truthixify left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The wallet privacy scope is fixed, but the new Clear History action is incorrect for the default All Chains view. History.tsx:78 maps filterChain === "all" to stellar, so clicking "Clear History" leaves the connected wallet's Horizen, Solana, and CKB entries visible. Clear only the connected wallet across all chains when All Chains is selected, while preserving other wallets, and test the actual clearing helper/component behavior for both the all-chain and single-chain cases.

…view

- Update clearHistory to support chain === 'all', clearing all entries
  for the wallet across all chains while preserving other wallets
- Pass filterChain directly in History.tsx and Activity.tsx so All
  Chains clears multi-chain activity for the connected wallet
- Add tests in History.test.tsx covering all-chain and single-chain
  clearing helper behavior and component DOM interactions
Bump @stellar/stellar-sdk>toml override from 4.2.0 to 5.0.1 to resolve
GHSA-4qx8-w7c3-pj3p, GHSA-9j65-hcg3-gc64, and GHSA-9qmh-m7c6-f92p.
Update dependency compatibility test and security audit documentation.
@legend-esc
legend-esc requested a review from truthixify October 23, 2026 11:29

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved exact head 55d217c after repeating the remote full-diff malware scan. All-chain clearing is now correctly scoped to the connected wallet, single-chain behavior remains scoped, the toml override is patched at 5.0.1, and both repository build and unit-test gates are green. The remaining Vercel status is an external authorization failure, not a code failure.

@truthixify
truthixify merged commit 524504d into wraith-protocol:develop Oct 23, 2026
2 of 3 checks passed
@legend-esc
legend-esc deleted the feat/history-activity-store branch October 24, 2026 06:00
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.

[Wave 10][Carryover] Replace the History placeholder with the existing activity store

2 participants