Skip to content

fix(transaction-pay-controller): use Infura endpoint for live token balance queries#8839

Draft
matthewwalsh0 wants to merge 1 commit into
mainfrom
fix/pay-infura-balance-nonce
Draft

fix(transaction-pay-controller): use Infura endpoint for live token balance queries#8839
matthewwalsh0 wants to merge 1 commit into
mainfrom
fix/pay-infura-balance-nonce

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

Explanation

When querying a live on-chain token balance, the controller previously resolved the network client using findNetworkClientIdByChainId, which returns whatever endpoint is currently selected for that chain — including custom RPC endpoints. Custom RPC endpoints may not support the `pending` block tag used by these calls, causing the query to fail.

This change adds a preference for the chain's Infura endpoint when one is configured. The implementation looks up the network configuration for the chain and selects the first `RpcEndpointType.Infura` endpoint it finds, falling back to the existing findNetworkClientIdByChainId behaviour if no Infura endpoint is configured or if the lookup throws.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@matthewwalsh0 matthewwalsh0 force-pushed the fix/pay-infura-balance-nonce branch 3 times, most recently from 2700781 to 77eee8b Compare May 18, 2026 14:00
@matthewwalsh0 matthewwalsh0 force-pushed the fix/pay-infura-balance-nonce branch from 77eee8b to a9de394 Compare May 18, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant