chore: add auth header to bridge-api token calls + use chain-agnostic gas fee estimates#40172
chore: add auth header to bridge-api token calls + use chain-agnostic gas fee estimates#40172
Conversation
✨ Files requiring CODEOWNER review ✨📜 @MetaMask/policy-reviewers (8 files, +40 -72)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔄 @MetaMask/swaps-engineers (11 files, +184 -208)
|
|
@metamaskbot update-policies |
|
Policy update failed. You can review the logs or retry the policy update here |
1 similar comment
|
Policy update failed. You can review the logs or retry the policy update here |
Builds ready [6a3ab05]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
|
@metamaskbot update-policies |
|
No policy changes |
Builds ready [c9ec827]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Builds ready [e95fbd0]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
MajorLift
left a comment
There was a problem hiding this comment.
Policy changes LGTM
- All changes are to internal packages
- No changes to webpack/mv3 policies
| "globals": { | ||
| "Buffer.from": true | ||
| }, |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
@metamaskbot update-policies |
|
No policy changes |
|
Builds ready [07b4729]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|



Description
Changes
Changelog
CHANGELOG entry:
chore: add auth header to bridge-api token calls,chore: use chain-agnostic gas fee estimates for calculating swap and bridge network feesRelated issues
Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3986
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Updates bridge controllers and request plumbing to include bearer authentication and to rely on chain-specific gas fee estimates, which can impact quote fetching and fee calculations across networks. Changes span background messaging, UI hooks, tests, and dependency/policy updates, increasing integration risk.
Overview
Bumps
@metamask/bridge-controller/@metamask/bridge-status-controller(and removes the local Yarn patch) and adjusts controller init to passclientId.Adds bearer-token support for bridge API calls: introduces
getBearerToken()(background request), allowsAuthenticationController:getBearerTokenthrough bridge-related messengers, and updates token-list fetchers (fetchPopularTokens/fetchTokensBySearchQuery) plus bridge hooks (usePopularTokens,useTokenSearchResults,useTokensWithFiltering) to fetch and forward a JWT viagetClientHeaders.Updates test fixtures/mocks to the new gas fee shape (
gasFeeEstimatesByChainId) and to expectAuthorization: Bearer ...headers; refreshes unit/e2e tests and LavaMoat policies accordingly.Written by Cursor Bugbot for commit 07b4729. This will update automatically on new commits. Configure here.