Draft
Conversation
Introduces CustomAssetGraduationMiddleware. When AccountsAPI or the backend websocket reports a balance for an asset that lives in customAssets[selectedAccount], the asset is removed from customAssets (EVM only). Snap-served chains (Solana, BTC, Tron) are excluded; RPC continues to be the sole balance fetcher for anything still in customAssets, so graduation is gated by sourceId on the subscription pipeline.
…et fails Introduces RpcFallbackMiddleware, inserted in the fast pipeline right after the parallel balance middleware. Any chain present in response.errors (network error, unprocessedNetworks, timeout) is handed off to RpcDataSource with the request filtered to just those chains. Successful RPC results are merged into the response and their entries are cleared from response.errors. Also adds a 15s (configurable) timeout to AccountsApiDataSource fetch; on timeout, every requested chain is marked as errored so the fallback middleware picks them up.
…urces Extracts the timeout helper into a shared `fetchWithTimeout` util and applies a configurable 15s timeout (`fetchTimeoutMs`) to PriceDataSource and TokenDataSource's API calls. On timeout the batch rejects so the surrounding middleware can proceed gracefully — metadata and price enrichment degrade instead of hanging the pipeline. Also migrates AccountsApiDataSource to use the shared util.
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.
Explanation
References
Checklist