fix(frontend): warn instead of blocking on incomplete token listings - #32
Merged
Merged
Conversation
An incomplete registry row is a fact about the indexer's record of a token, not proof that the token is unsafe to stream. Blocking a listing for a missing ticker or a reported supply of zero meant a team deploying and streaming in the same session could hit a wall, which is the exact case the token discovery selector exists to serve. Supply lags: a fresh mint has not necessarily been indexed yet. Both cases are now warnings attached to the token, rendered in neutral grey in the result list and repeated at the confirm step, where they actually matter. Neither can misroute funds: a transfer that cannot execute fails loudly on-chain and costs a fee, and it cannot send value to the wrong place. The remaining "unusable" level is now the one case that is not a warning but the absence of an identity: no asset name means the row cannot say which asset it describes, so there is nothing to resolve. That stays. The thing that does move money is untouched. Asset name and decimals still come from the chain in verifySelection, so classification only decides what the user is told, never what they can spend.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Follow-up to #31. That PR merged with a behaviour that blocks exactly the case the token selector exists to serve.
classifyTokenmarked a listingunusablewhen it had no symbol, or when the registry reported a supply of zero, andunusablerows are rendered non-selectable. A team that deploys a token and streams in the same session can hit a supply of zero that has simply not been indexed yet, and is then told the token cannot receive a stream.Both cases are now non-blocking warnings, rendered in neutral grey in the result list and repeated at the confirm step where the user is actually deciding.
What changed
get-symbol.unusablenow has exactly one producer: no asset name. That is not a warning but the absence of an identity — the row cannot say which asset it describes, so there is nothing to resolve.warningsfield onDiscoveredToken, threaded throughclassifyAll/dedupeByContract/RegistryCandidate.Safety
Unchanged.
assetNameanddecimalsstill come from the chain inverifySelection, and the transaction builder consumes the resolved values —toSelectionreadsdecimals/symboloffresult.resolved, never off the registry row. Classification only decides what the user is told; verification decides what they can spend.Impersonators keep their existing red badge, principal-to-principal comparison, and explicit confirm step.
Verification
npx vitest run— 191 passed (48 intoken-registry.test.ts, up from 43; five new cases covering each warning, the empty-symbol impersonation guard, and that a warned token still verifies normally).frontendtsc --noEmit— clean.frontendnpm run build— clean.frontendnpm run lint— 14 errors / 4 warnings, byte-identical to the pre-existing baseline; no new findings.Note: the
Run test suitechecks are currently red across every branch, includingmain. The cause is not code — GitHub reportsThe job was not started because your account is locked due to a billing issue.Verification here was done locally.