23 Commits

Author SHA1 Message Date
b585f70d31 feat: import wallet support, HYPE tracking, bug fixes
- Fix pollVerifiedWallets: route import wallets to /wallet endpoint and reconstruct running-balance ledger
- Fix generateRandomAddress: append 'IMPORT' suffix to prevent fake EVM addresses
- Add import chain: CSV upload via multipart, IMPORT_ONLY wallet registration
- Add HYPE summary cards with holdings, PnL, avg buy price, total invested
- Add BTC and SATS to TOKENS config
- Add backend DELETE on wallet removal (skip for import wallets)
- Fix chain name: hyperliquide → hyperevm (chainId 999)
- Add HSTS and security headers to nginx config
2026-06-17 20:34:54 +00:00
b7eb8ece97 docs: reconcile AGENTS.md with actual code (EIP-712 chainId, loadWallets verification, Aave endpoint) 2026-06-15 16:40:58 +00:00
d27efd4b90 Fix wallet pill filters and drag-and-drop for multi-chain wallets
- Fix ReferenceError: _dragAddr → _dragKey in pill checkbox onchange handler,
  restoring the ability to toggle wallet filters in the nav-bar
- Replace toggleWalletPill with setWalletChecked(key, this.checked) so pill
  checkboxes directly update filter state, sync all checkboxes, and refresh
  charts (matching the ledger-header checkbox behavior)
- Drag-and-drop reorder: switch from plain addresses to compound keys
  ("addr:chain") in dropWalletReorder and setWalletOrder, fixing clones
  when dragging wallets that share an address on different chains
- Update inline fallback WalletManager with the same compound-key logic
2026-06-15 06:27:57 +00:00
11c292eb90 fix: extend chart x-axes to current date for cumul, sats, and breakdown charts 2026-06-13 06:41:57 +00:00
32c20e67a2 docs: add remote Git credentials info to AGENTS.md 2026-06-12 07:08:05 +00:00
d96e56bde5 feat: draggable wallet reorder for chart layering 2026-06-11 19:16:18 +00:00
b52da96ba0 Fix avg buy price calculation by iterating snapshots oldest-first 2026-06-11 10:47:44 +00:00
8606673928 feat: stacked per-wallet area chart for Avg BTC Acquired/Day 2026-06-11 09:22:03 +00:00
80a7449688 Convert BTC Treasury Growth chart to stacked multi-wallet area chart 2026-06-11 08:43:25 +00:00
7a34190956 Generate daily data points for cumulative and breakdown charts 2026-06-11 07:24:36 +00:00
4f5a28ae84 fix: forward-fill wallet balances in chart aggregation for multi-wallet continuity 2026-06-11 06:21:42 +00:00
fab41179d0 Add double-click to reset chart zoom on all charts 2026-06-10 20:27:00 +00:00
e163f83963 Fix chart accumulation bug: render daily balance instead of cumulative sum 2026-06-10 20:05:58 +00:00
88c8f7927d feat: add lendingPlatform field to wallet state 2026-06-10 19:52:47 +00:00
e28e66b29f fix: scan all snapshots for oldest timestamp in fetchAllWalletData
snapshotsToDaily returns results sorted newest-first, so allSnaps[0] was
the newest timestamp. This caused fetchPrices to compute a near-zero date
range, resulting in $0 values for all but the most recent rows.

Also removed redundant refreshPrices() call from init flow (fetchAllWalletData
already fetches full-range prices). Added table data flow doc to AGENTS.md.
2026-06-10 19:52:11 +00:00
b659d26ad1 fix: Date.UTC spread operator and EMA for rolling sats chart 2026-06-10 19:17:32 +00:00
0ad8f03990 fix: 30-day rolling average for Avg BTC acquired/day chart with continuous daily timeline 2026-06-10 18:52:03 +00:00
d9e0c1b89c Remove redundant revoke button from wallet sidebar 2026-06-10 12:03:15 +00:00
6473d3cedf Fix EIP-712 chainId dynamic resolution; improve add-wallet modal
- Replace hardcoded chainId:1 with per-chain EIP-712 domain (base→8453, etc.)
- Add hyperliquide (chainId 998) as supported EVM chain
- Auto-fill wallet address and chain from eth_requestAccounts + eth_chainId
- Auto-pick unused color when adding wallet
- Remove chain dropdown and address input; add readonly displays
- Rename localStorage key to tracked_wallets
2026-06-10 11:31:10 +00:00
5ab9cb4b5c Enforce verified-only wallet monitoring
- Restore persistent verification: wallets.js loadWallets() now preserves
  isVerified, signature, messageData from localStorage (was reset to false).
  Only restores verification when messageData is present (anti-tampering).
- Add WalletManager.getVerifiedWallets() for EVM-only verification gating.
- Remove all hardcoded embedded data (walletCumulData, walletsMetadata,
  walletCosts, walletBuys, dailySatsData, aaveCumulData, totalCumulData).
- Derive all chart data dynamically from API snapshots.
- Rewrite calculateAggregatedSeries, calculateCurrentHoldings, setupSatsCard,
  setupBreakdownCard to source from addressSnapshots.
- Replace fetchAaveSnapshots with fetchAllWalletData (verified wallets only).
- Replace pollAaveUpdate with pollVerifiedWallets polling loop.
- Add inline EIP-712 verification (verifyOwnership, handleVerifyWallet,
  handleRevokeVerification) with MetaMask integration.
- Sidebar shows verified/unverified badges per wallet with verify/revoke buttons.
- Non-EVM wallets (btc, solana, bitcoin) auto-verify on add (trust-based).
- Update fallback WalletManager class identically with persistent verification.
2026-06-10 08:22:39 +00:00
c573e58e0f feat: add neon color picker for wallet management
- Replace muted Tailwind palette with 16-color neon palette
- Add clickable color dot in sidebar that opens a popup swatch grid
- Allow color override for all wallets (including embedded)
- Fix getColorForWallet to respect localStorage override
- Fix duplicate renameWallet in wallets.js
- Update Dockerfile to serve ESM modules via nginx
2026-06-10 07:10:24 +00:00
5716f34967 revert top nav layout: tracked wallets inline with hamburger menu 2026-06-10 06:40:15 +00:00
a61e0b0457 feat: multi-wallet architecture with localStorage state, EIP-712 verification, cross-tab WS leadership
- wallets.js: WalletManager state management with chain validation
- verifier.js: WalletVerifier EIP-712 signing via window.ethereum
- stream.js: WalletStreamManager with BroadcastChannel leader election, backoff + jitter
- AGENTS.md: updated with coding guidelines
2026-06-06 12:16:41 +00:00