feat: pass getUseAssetsControllerForRates to bridge controller#30308
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30308 +/- ##
==========================================
+ Coverage 81.98% 82.03% +0.05%
==========================================
Files 5447 5443 -4
Lines 145537 145287 -250
Branches 33248 33211 -37
==========================================
- Hits 119312 119185 -127
+ Misses 18094 17979 -115
+ Partials 8131 8123 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Why SmokeSwap: The BridgeController directly powers bridge and swap functionality. The new callback changes how token rates are sourced when the Why SmokeConfirmations: Per SmokeSwap tag description, when selecting SmokeSwap, also select SmokeConfirmations since transaction confirmations are part of the swap/bridge flow. Risk assessment (medium):
No performance tests: The changes are in controller initialization logic (not UI rendering, list components, or startup critical path). The feature flag check is a simple synchronous call with error handling, not a performance-sensitive operation. Performance Test Selection: |
|



Description
Pass the hook to BridgeController so it acts based on the feature flag.
No behaviour changes with the flag off.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3198
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes
BridgeControllerinitialization behavior by consulting remote feature flags and wiring new messenger permissions; could affect bridge rate sourcing when the flag is enabled or if flag state retrieval fails.Overview
Adds a
getUseAssetsControllerForRateshook toBridgeControllerinitialization that checks theassetsUnifyStateremote feature flag (v1) viaRemoteFeatureFlagController:getState, defaulting tofalseon missing/invalid state or errors.Updates the bridge init messenger types/delegation to allow calling
RemoteFeatureFlagController:getState, and extends unit tests to cover enabled/disabled/absent/exception cases for the new hook.Reviewed by Cursor Bugbot for commit 26c05d6. Bugbot is set up for automated code reviews on this repo. Configure here.