Skip to content

feat: privacy score badge on stealth address rows (#68)#84

Open
hartz0 wants to merge 1 commit into
wraith-protocol:developfrom
hartz0:feat/privacy-score-badge
Open

feat: privacy score badge on stealth address rows (#68)#84
hartz0 wants to merge 1 commit into
wraith-protocol:developfrom
hartz0:feat/privacy-score-badge

Conversation

@hartz0

@hartz0 hartz0 commented Jun 24, 2026

Copy link
Copy Markdown

closes #68

Summary

Implements issue #68 — local privacy score badge on each stealth address row.

Changes

src/lib/privacy-score.ts — pure scoring function, no network calls

  • Three weighted factors: address reuse (50%), balance accumulation (30%), transfer timing regularity (20%)
  • Returns score 0–100 and grade: green ≥75, yellow 40–74, red <40

src/lib/privacy-score.test.ts — 10 unit tests (vitest), all passing

src/components/PrivacyBadge.tsx — inline dot+label badge; click opens modal with per-factor breakdown and explanation

src/components/HorizenReceive.tsx / StellarReceive.tsx — badge rendered inline on each stealth address row next to the balance

src/context/ActivityContext.tsx — session store that persists scanned addresses so the history page can read them

src/pages/History.tsx — new /history route listing all scanned addresses with badge per row

src/components/Header.tsx / src/App.tsx — History nav link and route wired in

Acceptance criteria

  • Score computation function + tests
  • Badge rendered on receive rows + history rows
  • Explanation modal
  • Scoring is local-only, no network calls

- Add computePrivacyScore() in src/lib/privacy-score.ts
  Factors: address reuse (50%), balance accumulation (30%),
  transfer time-pattern regularity (20%)
  Grades: green ≥75, yellow 40–74, red <40
- Add 10 unit tests via vitest
- Add PrivacyBadge component with explanation modal
- Integrate badge into HorizenReceive and StellarReceive rows
- Add ActivityContext to persist scanned addresses
- Add /history page listing all scanned addresses with badges
- Wire ActivityProvider into provider tree
- Add History nav link
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@hartz0 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 Jun 24, 2026

Copy link
Copy Markdown

@hartz0 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 changed the base branch from main to develop June 24, 2026 14:49
@truthixify

Copy link
Copy Markdown
Contributor

Privacy score logic + PrivacyBadge component + tests look good. 4 conflicts to resolve:

  • package.json: re-add any deps you needed on top of develop's
  • src/App.tsx: keep develop's routes
  • src/components/StellarReceive.tsx: keep develop's content (Worker integration, sponsored withdrawal, etc.) and graft your PrivacyBadge mount in the row
  • src/pages/History.tsx: add/add conflict, develop already has its version from a prior PR. Take develop's structure and add your privacy score column/badge where appropriate
git fetch origin
git rebase origin/develop
git push --force-with-lease

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.

Privacy score badge (address-reuse visual indicator)

2 participants