metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

Fix #22938 - UX - Multichain - Send Flow - Update ENS address upon network change

Open darkwing opened this issue 1 year ago • 1 comments

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

  1. Have an ENS with two different address for Mainnet and Goerli
  2. Enter the new send flow
  3. Type in the ENS on Mainnet -- see a search result with the correct address
  4. Change the network picker to Goerli
  5. See the address change in the search result

Scenario 2

  1. Have an ENS with two different address for Mainnet and Goerli
  2. Enter the new send flow
  3. Type in the ENS on Mainnet -- see a search result with the correct address
  4. Click the search result (you'll go to the Amount screen)
  5. Change the network picker to Goerli
  6. See the address change in the recipient field change
  7. Execute the transaction
  8. 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.

darkwing avatar Feb 16 '24 19:02 darkwing

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.

github-actions[bot] avatar Feb 16 '24 19:02 github-actions[bot]

@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?

hesterbruikman avatar Apr 25 '24 10:04 hesterbruikman

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.

darkwing avatar May 17 '24 14:05 darkwing