shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
166 stars 177 forks source link

Allow users to see/switch the currently connected chain #2130

Closed gomesalexandre closed 2 years ago

gomesalexandre commented 2 years ago

Overview

As a user, I want to be able to see which IBC/EVM chain I'm currently connected to, and switch to another one.

References and additional details

hdwallet's ethSwitchChain() can be used to switch chains:

https://github.com/shapeshift/hdwallet/search?q=ethswitchchain

Acceptance Criteria

Need By Date

No response

Screenshots/Mockups

1inch has a similar UX: image

This will work in a similar fashion, with our own design (waiting for @shapeshift/product design input)

Estimated effort

3 hours

gomesalexandre commented 2 years ago

Assigned myself to this one for the time being, as there might be a few technical ramifications that need to be solved

gomesalexandre commented 2 years ago

Not technically blocked by https://github.com/shapeshift/hdwallet/pull/547/files, but would be great to get this in before. The "adding chain if missing" is a standard UX that's part of the chain-switching flow.

This PR also contains AVALANCHE_MAINNET_ADD_CHAIN_PARAMS which is a naive implementation that will work perfectly for us until we improve the API, build and properly pass said params from web.