feat: intial cross chain swaps
Fixes TEAM2-479, TEAM2-478, TEAM2-477, , TEAM2-481, TEAM2-453 Figma link (if any):
This PR enables cross chain swaps ⚔️
What changed (plus any additional context for devs)
-
tickets added to this PR to include sdk work
-
swapSheetFlow.spec e2e testing different network changes and checking that new components as the network switcher and the available network component on expanded state are only available when the feature flag is on
-
hardhatTransactionFlow.spec e2e to send a crosschain swap, mainnet DAI to optimism USDC
-
Patch added to swaps sdk to point it to a staging endpoint until we go live to production
Screen recordings / screenshots
What to test
https://www.loom.com/share/328873ac4c4f42edbfa65de3153b89dd
Final checklist
- [x] Assigned individual reviewers?
- [x] Added labels? (
team1/team2,critical path,release,dev QA) - [x] Did you test both iOS and Android?
- [ ] If your changes are visual, did you check both the light and dark themes?
- [x] Added e2e tests? If not, please specify why
- [ ] If you added new critical path files, did you update the CODEOWNERS file?
- [ ] If no
dev QAlabel, did you add the PR to the QA Queue?
TEAM2-479 Transactions: Use `getQuote` from SDK
TEAM2-478 Transactions: Use `getCrosschainQuoteExecutionDetails` from SDK
TEAM2-453 Errors: No route found
https://www.figma.com/file/SFfYzRoHlapEecS0LTLwhQ/Swap-Aggregator-V2?node-id=761%3A47140
- New button state "No route found"
- New no route found explainer
we need to add another error code coming from backend for this error
android e2e passing with last commit
- e2e/hardhatTransactionFlowSwaps.spec.js
- e2e/swapSheetFlow2.spec.js
/rebase
Okay, I ran through the following:
mainnet eth -> mainnet usdc: This looked normal to me. https://recordit.co/NFfilCQWz0
mainnet eth -> arbitrum dai: Swap went through, didn't see a balance update. Balance updates seemed to be delayed on prod as well, though. https://recordit.co/mNQOK0Djhw
mainnet eth -> optimism eth: Same issue with L2 balance update. https://recordit.co/01mPvw0SQ3
mainnet eth -> polygon wbtc: Same issue with L2 balance update. https://recordit.co/SjgTHUtAmL
Issue found: The flip button seems broken when flipping assets that sit on the same chain. Crosschain flipping seems to work fine for some reason. https://recordit.co/PtBpoATz6H https://recordit.co/d7STd3Hijq
thank you for the videos @derHowie ! fixed the issue on the last commit
/testflight