feat: add flag to exclude networks from using infura for live balance#8992
Open
jpuri wants to merge 3 commits into
Open
feat: add flag to exclude networks from using infura for live balance#8992jpuri wants to merge 3 commits into
jpuri wants to merge 3 commits into
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.
Explanation
Add flag to exclude networks from using infura for live balance.
It is needed primarily for Monad, related to PR: #8839
References
Checklist
Note
Medium Risk
Changes which RPC endpoint validates live balances before pay quotes/submit; misconfigured flags could cause wrong or failed balance reads on affected chains.
Overview
Adds remote feature flag
confirmations_pay_extended.excludeChainIdsFromInfuraso specific chains can opt out of preferring Infura for live on-chain balance RPCs (e.g. Monad).Introduces
isChainExcludedFromInfura(case-insensitive chain ID match) and wiresgetLiveTokenBalanceto passpreferInfura: falsewhen the chain is listed, so balance queries use the default network client instead of forcing the Infura endpoint. Behavior is unchanged for chains not in the list.Unit tests cover the flag helper and Infura skip/use paths in live balance fetching; the package changelog documents the change.
Reviewed by Cursor Bugbot for commit e244127. Bugbot is set up for automated code reviews on this repo. Configure here.