Skip to content

chore: read bridge gas fee estimates from gasFeeEstimatesByChainId#7826

Merged
micaelae merged 9 commits intomainfrom
swaps3122-gas-fees-by-chain
Feb 5, 2026
Merged

chore: read bridge gas fee estimates from gasFeeEstimatesByChainId#7826
micaelae merged 9 commits intomainfrom
swaps3122-gas-fees-by-chain

Conversation

@micaelae
Copy link
Member

@micaelae micaelae commented Feb 3, 2026

Explanation

Changes the gasFeeEstimates source used in quote metadata calculations to the chain-agnostic gasFeeEstimatesByChainId state. Resulting values will be the same as before but this sets up the clients for removing global selected network references

See CHANGELOG for required client changes

Draft extension PR: MetaMask/metamask-extension#37593

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

Note

Medium Risk
This is a breaking state/selector contract change and it touches fee calculation inputs; incorrect wiring or missing per-chain estimates could surface as zero/incorrect displayed network fees.

Overview
selectBridgeQuotes now derives gas pricing from gasFeeEstimatesByChainId keyed by the quote’s source chain (and returns 0 gas fees when estimates are unavailable), removing reliance on a globally selected network.

Tests and utilities were updated to reflect the new state shape and chain-id formatting (toHex), and the bridge-controller’s metrics tracking generics were tightened; the changelog marks this as a breaking client-facing change.

Written by Cursor Bugbot for commit 1469a17. This will update automatically on new commits. Configure here.

@micaelae micaelae changed the title chore: use gasFeesByChainId to remove selectedNetworkClientId reference chore: read bridge gas fee estimates from gasFeeEstimatesByChainId Feb 5, 2026
@micaelae micaelae marked this pull request as ready for review February 5, 2026 00:55
@micaelae micaelae requested review from a team as code owners February 5, 2026 00:55
@micaelae micaelae enabled auto-merge February 5, 2026 01:25
@micaelae micaelae added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 9a6a5db Feb 5, 2026
301 of 302 checks passed
@micaelae micaelae deleted the swaps3122-gas-fees-by-chain branch February 5, 2026 16:25
@micaelae
Copy link
Member Author

micaelae commented Feb 5, 2026

@metamaskbot publish-preview

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.

2 participants

Comments