Activity tracker, TON/Tron SDK support, address validation#18
Merged
BitHighlander merged 11 commits intodevelopfrom Mar 15, 2026
Merged
Activity tracker, TON/Tron SDK support, address validation#18BitHighlander merged 11 commits intodevelopfrom
BitHighlander merged 11 commits intodevelopfrom
Conversation
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
727059e to
038586d
Compare
- 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]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… 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]>
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.
Summary
Test plan