metamask-extension
metamask-extension copied to clipboard
Fix #22938 - UX - Multichain - Send Flow - Update ENS address upon network change
Description
Changing the network mid-send can effect ENS domains in a negative way. Namely, an ENS domain can have a different addresses per chain. This PR ensure that ENS lookups are done when the user changes chains.
Related issues
Fixes: https://github.com/MetaMask/metamask-extension/issues/22938
Manual testing steps
Scenario 1
- Have an ENS with two different address for Mainnet and Goerli
- Enter the new send flow
- Type in the ENS on Mainnet -- see a search result with the correct address
- Change the network picker to Goerli
- See the address change in the search result
Scenario 2
- Have an ENS with two different address for Mainnet and Goerli
- Enter the new send flow
- Type in the ENS on Mainnet -- see a search result with the correct address
- Click the search result (you'll go to the Amount screen)
- Change the network picker to Goerli
- See the address change in the recipient field change
- Execute the transaction
- Ensure token sent to correct address
Screenshots/Recordings
Before
(In the GitHub issue)
After
Coming....
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] I've clearly explained what problem this PR is solving and how it is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [ ] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
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.
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.
@darkwing @BZahory I see that this fix was added and reverted recently. Can you please tell me whether the latest implementation addresses this issue? https://github.com/MetaMask/MetaMask-planning/issues/2403?
This was reverted because we took away the network picker from the send flow and this case shouldn't be allowed to happen, just as it isn't now.