MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.06k stars 4.93k forks source link

Make SwapsController support multichain #23566

Open desi opened 8 months ago

desi commented 8 months ago

What is this about?

Make SwapsController support multichain.

The swaps controller currently relies upon the "globally selected network". It should be refactored such that each chain interaction is made by methods that include a networkClientId parameter, which determines which network client/chain is used.

Scenario

No response

Design

No response

Technical Details

N/A

Threat Modeling Framework

N/A

Acceptance Criteria

Stakeholder review needed before the work gets merged

References

No response

mcmire commented 2 weeks ago

To implement this ticket, it seems that we would want to:

mcmire commented 1 week ago

I am going to have to revisit this to ensure that the controller is fully multichain-compatible.

I have not updated the estimate, just noting a change in scope here. I may create a new ticket to capture this work but I will talk to the team tomorrow about it.

mcmire commented 1 week ago

I have asked the Swaps team whether all of what I wrote above would be necessary to complete this ticket. Waiting to hear back before continuing.

mcmire commented 1 week ago

Confirmed in standup today that we do need to support polling for simultaneous networks, and we are okay with overwriting state data when switching networks.