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
This commit is contained in:
Dione
2026-06-17 20:34:54 +00:00
parent b7eb8ece97
commit b585f70d31
4 changed files with 328 additions and 150 deletions

View File

@ -39,7 +39,7 @@ const LS_KEY = 'tracked_wallets';
const VALID_CHAINS = new Set([
'base', 'ethereum', 'bitcoin', 'arbitrum', 'optimism',
'polygon', 'solana', 'avalanche', 'bsc', 'fantom', 'btc',
'hyperevm',
'hyperevm', 'import',
]);
/* Regex patterns for address validation per chain */
@ -61,6 +61,9 @@ const ADDRESS_PATTERNS = {
/* Solana — base58, 32-44 chars */
solana: /^[1-9A-HJ-NP-Za-km-z]{32,44}$/,
/* Import — accepts any address format (EVM, BTC, Solana, etc.) */
import: /^(0x[0-9a-fA-F]{40}|bc1[a-z0-9]{25,62}|[13][a-km-zA-HJ-NP-Z1-9]{25,34}|[1-9A-HJ-NP-Za-km-z]{32,44})$/,
};
/* ------------------------------------------------------------------ */