Skip to content

feat: stealth account labeling + network indicator + wrong-network detection#48

Closed
JafetCHVDev wants to merge 2 commits into
wraith-protocol:mainfrom
JafetCHVDev:feat/network-indicator-wrong-network
Closed

feat: stealth account labeling + network indicator + wrong-network detection#48
JafetCHVDev wants to merge 2 commits into
wraith-protocol:mainfrom
JafetCHVDev:feat/network-indicator-wrong-network

Conversation

@JafetCHVDev
Copy link
Copy Markdown

@JafetCHVDev JafetCHVDev commented Jun 1, 2026

Implements Issues #20 and #23.

Stealth Account Labeling (#20)

  • StealthLabel type with \stealthAddress, \label, \ ags[], \hiddenAt?, \createdAt\
  • localStorage CRUD helpers keyed per-wallet (\wraith:labels:\)
  • useStealthLabels React hook: CRUD, search, tag filter, hide/unhide, export/import, privacy warning
  • StealthLabelEditor — inline editable label per stealth row (pencil → input → save on blur/Enter)
  • StealthLabelBar — toolbar: search, export JSON, import with conflict prompt, hidden toggle, tag chip filter, privacy warning banner
  • Integrated into all 4 chain receive components (Horizen, Stellar, Solana, CKB)
  • Privacy warning shown only on first label save (one-time dismiss via localStorage)
  • Data never leaves the browser — fully local

Network Indicator + Wrong-Network Detection (#23)

  • *\useNetworkStatus* hook — reactive wallet network detection per chain:
    • Horizen: \useChainId()\ from wagmi (expected chain ID 2651420)
    • Stellar: \getNetwork()\ from Freighter (TESTNET vs PUBLIC)
    • Solana: \getGenesisHash()\ via \Connection\ (devnet genesis hash)
    • CKB: \get_blockchain_info\ RPC (testnet chain)
    • Polls every 5s for non-event-based chains (Stellar, Solana, CKB)
  • NetworkBadge — color-coded header badge (green=correct, yellow=wrong, red=mainnet)
  • WrongNetworkBanner — sticky banner with chain-specific switch instructions, red variant for mainnet
  • All Send/Derive/Register/Scan/Withdraw buttons disabled when wrong network or mainnet detected
  • Network metadata centralized in \src/config/networks.ts\

Closes #20, Closes #23

- StealthLabel type with stealthAddress, label, tags, hiddenAt, createdAt
- localStorage CRUD helpers keyed per-wallet
- useStealthLabels React hook with search, tag filter, hide/unhide
- StealthLabelEditor inline component (pencil icon, input, save on blur/Enter)
- StealthLabelBar toolbar: search, export JSON, import with conflict prompt,
  hidden toggle, tag chip filter, privacy warning on first save
- Integrated into all 4 receive components (Horizen, Stellar, Solana, CKB)
- Privacy warning: one-time tooltip shown only when saving first label

Closes wraith-protocol#20
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

A member of the Team first needs to authorize it.

- useNetworkStatus hook: reactive wallet network detection per chain
  - Horizen: useChainId() from wagmi (chain ID 2651420)
  - Stellar: Freighter getNetwork() (TESTNET vs PUBLIC)
  - Solana: getGenesisHash() via Connection (devnet genesis hash)
  - CKB: get_blockchain_info RPC (testnet/pudge chain)
  - Polls every 5s for non-reactive chains (Stellar, Solana, CKB)
- NetworkBadge: color-coded badge in header (green=correct,
  yellow=wrong-network, red=mainnet/unknown)
- WrongNetworkBanner: sticky banner with chain-specific switch
  instructions, prominent red variant for mainnet detection
- All Send buttons disabled when wrong network or mainnet detected
- All Derive/Register/Scan/Withdraw buttons disabled when wrong
  network or mainnet detected
- Network metadata centralized in src/config/networks.ts
- Only 5s polling for wallets without event-based network APIs

Closes wraith-protocol#23
@JafetCHVDev JafetCHVDev changed the title feat: add stealth account labeling with localStorage persistence feat: stealth account labeling + network indicator + wrong-network detection Jun 1, 2026
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@JafetCHVDev 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
Copy link
Copy Markdown
Contributor

Closing this one for two reasons:

  1. Issue overlap with your feat: stealth account labeling + personal organization (#20) #42. This PR bundles issue Stealth account labeling + personal organization #20 (stealth labeling) which is already in your other open PR feat: stealth account labeling + personal organization (#20) #42. Having two PRs by the same author touching the same labeling files at the same time will conflict and double the review work. Let's pick one: I'd suggest keeping feat: stealth account labeling + personal organization (#20) #42 for the labeling (it's already rebased clean, only needs the UTF-8 re-encode I just commented on) and using a new focused PR for the network-indicator/wrong-network detection from issue Network indicator + wrong-network detection #23.

  2. Bundles two issues. Even setting feat: stealth account labeling + personal organization (#20) #42 aside, this PR mixes issue Stealth account labeling + personal organization #20 (labeling) and issue Network indicator + wrong-network detection #23 (network indicator). Each should be its own PR per the standard contributing flow, so they can be reviewed and merged independently.

  3. npm package-lock.json (16,783 lines). This repo uses pnpm; only pnpm-lock.yaml should be committed.

Recommended path: land #42 (after the UTF-8 fix), then open a new small PR with only the NetworkBadge.tsx, WrongNetworkBanner.tsx, useNetworkStatus.ts, config/networks.ts, and Header.tsx changes for issue #23. Drop the package-lock.json there too.

Thanks @JafetCHVDev.

@truthixify truthixify closed this Jun 1, 2026
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.

Network indicator + wrong-network detection Stealth account labeling + personal organization

2 participants