CoinHippo-Labs / connext-bridge

Connext Bridge UI
https://bridge.connext.network
MIT License
96 stars 89 forks source link

Bridge UI : Form should support deeplinking URL param `amount` for a better UX #5

Closed dewanshparashar closed 1 year ago

dewanshparashar commented 1 year ago

Objective

For a seamless user experience, coming to https://bridge.connext.network from other apps, most of the form data should be prefilled from the URL itself. eg. https://bridge.connext.network/ETH-from-ethereum-to-arbitrum?amount=0.11

Reproduce

URL: https://bridge.connext.network/ETH-from-ethereum-to-arbitrum?amount=0.11 The amount is being passed in URL but still the field is empty when the form loads.

Code

In the code: https://github.com/CoinHippo-Labs/connext-bridge/blob/main/components/crosschain-bridge/index.js, we are extracting query.amount from the URL using get query params. However, this value is not being set automatically in the form during any point in the render cycle.

pjenviri commented 1 year ago

we've fixed it. thanks.