Files
worldmonitor/shared/crypto.json
Nicolas Dos Santos 7b9426299d fix: Tech Readiness toggle, Crypto top 10, FIRMS API key check (#1132, #979, #997) (#1135)
* fix: three panel issues — Tech Readiness toggle, Crypto top 10, FIRMS key check

1. #1132 — Add tech-readiness to FULL_PANELS so it appears in the
   Settings toggle list for Full/Geopolitical variant users.

2. #979 — Expand crypto panel from 4 coins to top 10 by market cap
   (BTC, ETH, USDT, BNB, SOL, XRP, USDC, ADA, DOGE, TRX) across
   client config, server metadata, CoinPaprika fallback map, and
   seed script.

3. #997 — Check isFeatureAvailable('nasaFirms') before loading FIRMS
   data. When the API key is missing, show a clear "not configured"
   message instead of the generic "No fire data available".

Closes #1132, closes #979, closes #997

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace stablecoins with AVAX/LINK, remove duplicate key, revert FIRMS change

- Replace USDT/USDC (stablecoins pegged ~$1) with AVAX and LINK
- Remove duplicate 'usd-coin' key in COINPAPRIKA_ID_MAP
- Add CoinPaprika fallback IDs for avalanche-2 and chainlink
- Revert FIRMS API key gating (handled differently now)
- Add sync comments across the 3 crypto config locations

* fix: update AIS relay + seed CoinPaprika fallback for all 10 coins

The AIS relay (primary seeder) still had the old 4-coin list.
The seed script's CoinPaprika fallback map was also missing the
new coins. Both now have all 10 entries.

* refactor: DRY crypto config into shared/crypto.json

Single source of truth for crypto IDs, metadata, and CoinPaprika
fallback mappings. All 4 consumers now import from shared/crypto.json:
- src/config/markets.ts (client)
- server/worldmonitor/market/v1/_shared.ts (server)
- scripts/seed-crypto-quotes.mjs (seed script)
- scripts/ais-relay.cjs (primary relay seeder)

Adding a new coin now requires editing only shared/crypto.json.

* chore: fix pre-existing markdown lint errors in README.md

Add blank lines between headings and lists per MD022/MD032 rules.

* fix: correct CoinPaprika XRP mapping and add crypto config test

- Fix xrp-ripple → xrp-xrp (current CoinPaprika id)
- Add tests/crypto-config.test.mjs: validates every coin has meta,
  coinpaprika mapping, unique symbols, no stablecoins, and valid
  id format — bad fallback ids now fail fast

* test: validate CoinPaprika ids against live API

The regex-only check wouldn't have caught the xrp-ripple typo.
New test fetches /v1/coins from CoinPaprika and asserts every
configured id exists. Gracefully skips if API is unreachable.

* fix(test): handle network failures in CoinPaprika API validation

Wrap fetch in try-catch so DNS failures, timeouts, and rate limits
skip gracefully instead of failing the test suite.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Elie Habib <elie.habib@gmail.com>
2026-03-07 18:23:32 +04:00

32 lines
1.0 KiB
JSON

{
"ids": [
"bitcoin", "ethereum", "binancecoin", "solana",
"ripple", "cardano", "dogecoin", "tron",
"avalanche-2", "chainlink"
],
"meta": {
"bitcoin": { "name": "Bitcoin", "symbol": "BTC" },
"ethereum": { "name": "Ethereum", "symbol": "ETH" },
"binancecoin": { "name": "BNB", "symbol": "BNB" },
"solana": { "name": "Solana", "symbol": "SOL" },
"ripple": { "name": "XRP", "symbol": "XRP" },
"cardano": { "name": "Cardano", "symbol": "ADA" },
"dogecoin": { "name": "Dogecoin", "symbol": "DOGE" },
"tron": { "name": "TRON", "symbol": "TRX" },
"avalanche-2": { "name": "Avalanche", "symbol": "AVAX" },
"chainlink": { "name": "Chainlink", "symbol": "LINK" }
},
"coinpaprika": {
"bitcoin": "btc-bitcoin",
"ethereum": "eth-ethereum",
"binancecoin": "bnb-binance-coin",
"solana": "sol-solana",
"ripple": "xrp-xrp",
"cardano": "ada-cardano",
"dogecoin": "doge-dogecoin",
"tron": "trx-tron",
"avalanche-2": "avax-avalanche",
"chainlink": "link-chainlink"
}
}