metamask-extension
metamask-extension copied to clipboard
feat: feature-flagged cross-chain swaps route [METABRIDGE-867]
Description
This change adds a placeholder route for the cross-chain swaps experience (roughly based on swaps page). Clicking on the Bridge button should link to the route when the feature flag is turned on. Otherwise, the portfolio bridge experience is loaded (current behavior)
Related issues
Fixes: METABRIDGE-867
Manual testing steps
- Build locally and set
BRIDGE_USE_DEV_APIS=1
- Check that bridge-api getAllFeatureFlags is fetched
- Verify that bridgeState FF is set to true in state logs
- Click on Bridge button and verify Bridge page is visible
- Build locally and set
BRIDGE_USE_DEV_APIS=0
- Wait ~10 minutes
- Reload and Check that bridge-api getAllFeatureFlags is fetched
- Verify that bridgeState FF is set to false in state logs
- Click on Bridge button and verify Portfolio URL is opened in a new tab
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [X] I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using JSDoc format if applicable
- [ X] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.