Skip to content

Activity tracker, TON/Tron SDK support, address validation#18

Merged
BitHighlander merged 11 commits intodevelopfrom
feature/activity-tracker
Mar 15, 2026
Merged

Activity tracker, TON/Tron SDK support, address validation#18
BitHighlander merged 11 commits intodevelopfrom
feature/activity-tracker

Conversation

@BitHighlander
Copy link
Collaborator

@BitHighlander BitHighlander commented Mar 14, 2026

Summary

  • Activity Tracker: Unified tx activity panel with network-scoped history scanning, chain selector dropdown, on-chain confirmation tracking with visual badges, bounce animation on new txs
  • TON Send Support: Full TON tx builder, bounceable/non-bounceable address handling, balance consolidation to single endpoint
  • SDK: Add TON and Tron address + signing endpoints to keepkey-sdk
  • Address Validation: Per-network validation with descriptive error messages across 15 languages
  • UX Polish: Single-chain refresh on AssetPage, chain logos in selector, networkId/caip mono styling

Test plan

  • Verify activity tracker shows recent txs per chain
  • Test chain selector dropdown filters correctly
  • Confirm TON send flow end-to-end (build → sign → broadcast)
  • Verify address validation rejects invalid addresses per network
  • Check bounce animation triggers on new activity
  • Test single-chain balance refresh button on asset page

Replace the swap-only floating bubble with a generic activity tracker
that shows recent transaction events across all wallets and chains.

- Always-visible bottom-left bubble (no feature flag)
- Extends api_log table with txid/chain/activity_type columns (no new tables)
- Auto-detects sign operations via SIGNING_ROUTES + ROUTE_TO_CHAIN mapping
- Tracks internal RPC broadcasts and swap executions in api_log
- Queries api_log + swap_history for unified activity feed
- ActivityPanel drawer with txid copy, explorer links, timestamps
@BitHighlander BitHighlander force-pushed the feature/activity-tracker branch from 727059e to 038586d Compare March 14, 2026 02:38
BitHighlander and others added 9 commits March 13, 2026 20:51
- Add scanChainHistory RPC: calls Pioneer GetTxHistory per chain,
  stores results as api_log entries with send/receive activity type
- UTXO chains query by xpub, account-based chains query by address
  (both resolved from cached balances table)
- Dedupe: skips txids already in api_log
- ActivityPanel: horizontal chain pill selector with icons (sorted by USD balance)
- "Scan [CHAIN] History" button appears when a network is selected
- getRecentActivity now supports optional chainId filter
- Add 'receive' to ActivityType, fix 'broadcast' → 'send' mapping
- Add apiLogTxidExists() helper for dedup check
- Remove "All" option and horizontal pill selector
- Single <select> dropdown with chain icon, forced network selection
- Refresh icon next to dropdown triggers Pioneer scan for that network
- Empty state prompts "Select a network to view transaction history"
- Scan result shown inline as compact toast (+N txs / Up to date / error)
- Replace native <select> with custom dropdown showing chain icons
  (native <option> cannot render images)
- Dropdown maxH 180px with scroll for long chain lists
- Click-away dismisses dropdown
- Shrink panel to 380px wide, 55vh / 480px max height
- Trigger: "Bitcoin (BTC)" with networkId on the right
- Dropdown rows: icon | symbol | coin name | networkId (mono) | checkmark
- All text truncates gracefully in narrow panel
- Store tx metadata (confirmations, blockHeight, value, fee, direction)
  in api_log response_body JSON on scan
- Rescan updates confirmation counts on existing entries (not just skip)
- RecentActivity type extended with confirmations, blockHeight, fee
- ConfBadge component: red dot = unconfirmed, yellow = partial, green = confirmed
- Per-chain confirmation thresholds (BTC:6, ETH:12, ATOM:1, SOL:32, etc.)
- Unconfirmed txs get red border highlight
- Block height shown in 9px mono on each row
- No polling — only refresh button updates confirmation state
TON send (build → sign → broadcast):
- Derive ed25519 pubkey via direct transport.call (bypass hdwallet's BTC scriptType)
- Compute correct v4r2 wallet address vault-side (tonV4R2Address)
- Build TON v4r2 transfer with StateInit for uninitialized wallets
- Fix V4R2_CODE_BOC_B64 constant (was truncated, 521→988 chars)
- Fix _internal serialization: BigInt→string, Buffer→hex for JSON round-trip
- Broadcast through Pioneer instead of direct toncenter.com

Balance fetching:
- Replace GetPortfolio (charts endpoint) with single GetPortfolioBalances call
- Remove two fallback blocks (zero-natives retry + BTC-specific retry)
- Classify flat response into natives vs tokens by CAIP path and type field
…tion, single-chain refresh

- Add TON and Tron address/signing endpoints to keepkey-sdk
- Add per-network address validation with descriptive i18n error messages (15 langs)
- Add bounce animation to ActivityTracker when new txs arrive
- Add single-chain balance refresh button on AssetPage
- Pass bounceable:false for TON addresses (UQ prefix for safe receiving)
- Remove overly generic "address too short" validation

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@BitHighlander BitHighlander changed the title feat: unified activity tracker — recent txids for all chains Activity tracker, TON/Tron SDK support, address validation Mar 15, 2026
… checks, precision guards

- TON: validate CRC16 checksum in parseTonAddress (funds-at-risk fix)
- TON: add 30s AbortController timeout on all TON Center API calls
- TON: validate seqno bounds (0..0xFFFFFFFF) after parsing
- TON: fix BOC offset size (3→4 bytes) per TON spec
- TON: explicit network error handling — don't assume uninitialized on fetch failure
- BitWriter: add bounds check to prevent silent buffer overflow
- ED25519 pubkey: strict 32/33 byte check (was >= 32, accepting oversized keys)
- Tron: guard sunAmount against Number.MAX_SAFE_INTEGER overflow
- Zcash: add zatoshi BigInt overflow guard, add Sapling (zs1) address support
- ActivityTracker: fix timer leak (store setTimeout IDs for cleanup), add error logging
- ActivityTracker: remove key={displayCount} forcing unnecessary remounts
- ActivityPanel: fix stale closure (remove scanning from handleScan deps), use ref guard
- ActivityPanel: build chainMap for O(1) lookups instead of nested CHAINS.find()
- DB: escape LIKE wildcards in swap history asset filter

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@BitHighlander BitHighlander merged commit d4f2208 into develop Mar 15, 2026
1 check passed
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