Repository navigation
Conversation
…call per token
The vault price poller requested /tokens/{token_id} once per RWA token, all
in parallel, every 5 minutes on every pod (850 requests per pod today). The
bursts exceed LOS's per-route rate limit, so most price requests got 429 and
so did real users of the token page.
/trusted-tokens already returns each token's price (the same item
/tokens/{token_id} reads for a trusted token), so read it from there. That's
one LOS request per cycle.
DGE-8410
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…OS fails
The token page sent /tokens/{id} once with retries off, and any failure
replaced the whole page with an error, even though the token exists and the
other sections load from other sources.
- Retry the token request up to 3 times (1s, 2s, 4s) on 429 or a network
error, which is how a throttled response without CORS headers looks.
- A 404 or 400 still shows the error page. Any other failure renders the page
with a "token details unavailable" notice in the header, so holders, DEX
trades and transfers still load.
- Show "--" for a holder's USD value when the token has no price, instead of
"$NaN".
DGE-8266
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests - When LOS fails, the "token details unavailable" header now still shows the issuer, so tokens that share a currency code can be told apart. - The vault price test waits for the price cache instead of a fixed number of promise ticks. - The IOU page tests clear the shared query cache between tests, and the 404 test checks only that the error page shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
High Level Overview of Change
Stops the Explorer from flooding LOS
/tokens/{token_id}, and keeps the token page usable when LOS throttles it./trusted-tokensresponse the poller already fetches. That's 1 LOS request per pod every 5 minutes instead of ~850./tokens/{id}on 429. If it still fails, show the issuer and a "token details unavailable" notice instead of the error page.--for USD value when there's no price, instead of$NaN.Context of Change
Each pod requested
/tokens/{token_id}once per RWA token (850 today), all at once, every 5 minutes. The bursts are far over the route's rate limit, even after LOS #137 raised it to 100/s with a burst of 200. So most get 429, and so do users' token pages./trusted-tokensalready returns the samepricethat/tokens/{token_id}reads for a trusted token. I didn't usePOST /tokens/batch-get: it reads the generaltokenstable, nottrusted-tokens, so prices could differ.On the token page, retries were off (
retry: falsein the sharedQueryClient), and any/tokens/{id}error replaced the whole page. Now:Not fixed here: a 404 shows "Something bad happened" instead of its own message, because the error lookup gets the error object rather than the status. This predates the PR, and the 404 text ("Account not found") is wrong for tokens, so it needs new copy.
Type of Change
Codebase Modernization
Not needed: the touched components are already TypeScript function components, and
server/is plain JavaScript.Before / After
/tokens/{token_id}per pod per 5 min, mostly 429/api/v1/vaults/asset-pricesresponse unchangedOnly 36 of the 850 RWA tokens have a non-zero price in LOS. A vault asset that still has no price is missing it in LOS.
Test Plan
/trusted-tokenswith no/tokens/{id}request; a 429 is retried and the token renders; repeated failures render the page with the issuer and notice; a price-less holder shows--./trusted-tokensreturnspricefor RWA tokens.