From b3adf571be06808477ed017f63b9409ef31bc909 Mon Sep 17 00:00:00 2001 From: jayteemoney Date: Fri, 2 Oct 2026 14:35:44 +0100 Subject: [PATCH] fix(frontend): warn instead of blocking on incomplete token listings 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. --- .../src/components/stream/token-selector.tsx | 15 +++ frontend/src/lib/token-registry.ts | 80 +++++++++++--- tests/token-registry.test.ts | 101 ++++++++++++++---- 3 files changed, 164 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/stream/token-selector.tsx b/frontend/src/components/stream/token-selector.tsx index 2af0436..c730984 100644 --- a/frontend/src/components/stream/token-selector.tsx +++ b/frontend/src/components/stream/token-selector.tsx @@ -232,6 +232,11 @@ function ResultRow({ {unusable && token.unusableReason && (
{token.unusableReason}
)} + {token.warnings?.map((warning) => ( +
+ {warning} +
+ ))} ); @@ -647,6 +652,16 @@ export function TokenSelector({ value, onChange, disabled }: TokenSelectorProps) )} + {confirming.warnings?.length ? ( + + ) : null} +