Repository navigation
feat: import explorer-verified tokens into the pair list - #25
Merged
Merged
Conversation
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.
Verified-token mass import
Imports the Mintlayer explorer's verified token list into Token
Management so every approved token becomes tradeable without manual ID
entry. Imports land in the same favourites store that drives the Trading
pair selector, so imported tokens appear there on next load.
GET /api/explorer-tokens(new): server-side proxy for theexplorer token API. Fixed hosts only (staging explorer for
mainnet/testnet, optional
EXPLORER_TOKENS_API_BASEoverride), bothsupply filters merged,
verified === truerows kept, streamed 2 MiBbody cap, JSON content-type enforcement, 12 s timeout, in-memory cache
with stampede dedupe (respects the explorer's ≤1 req/10 s etiquette).
No explorer-controlled string reaches the DOM unescaped or oversized.
TokenSearch): "Browse verified tokens" — preview withselect-all, per-row checkboxes, already-listed badge, and an
"Import selected (N)" action merging into favourites (cap 500).
token-info-client.ts):node_get_tokens_infois now called in 50-id chunks aligned by each result's own
content.token_id— hundreds of imported tokens cost a couple of RPCsinstead of one per token (Token Management + Order Book both use it).
POST /api/prefshardening: entry validation (tokenId ≤128,ticker ≤32, legacy strings tolerated), 1000-entry cap, 1 MiB body
pre-check;
GETre-validates stored rows on read.Security review pass applied: streamed body cap instead of full-buffer,
persist-before-commit favourite toggles (no stale overwrites), host
disclosure removed from the route response.
Gates:
tscclean, 876 tests green, production build OK.