sygmaprotocol / sygma-widget

Transfer widget for the sygmaprotocol
5 stars 2 forks source link

fix: Switching to a different TOKEN mapping for "From - TO" relationship is not updated in UI if amount is inserted #155

Closed saadahmsiddiqui closed 6 months ago

saadahmsiddiqui commented 6 months ago

Description

Resource selection is not updated on UI when a destination network is changed.

Related Issue Or Context

https://github.com/sygmaprotocol/sygma-widget/issues/117

When destination network is changed by the user IMO the resource selected, amount and destination address need to be reset so that they may update the UI with correct values. I have added functionality that resets the selected resource, which compels user to select the desired token again. Furthermore, the address input should be cleared if the source network is of type EVM however, potential destination is of a different type

Closes: #117

Types of changes

mpetrunic commented 6 months ago

This should go into main branch. It's bugfix for current release.

It seems like you are going to need to create new PR and cherry pick this commit

cc @saadjhk

saadahmsiddiqui commented 6 months ago

This should go into main branch. It's bugfix for current release.

It seems like you are going to need to create new PR and cherry pick this commit

cc @saadjhk

Sure will create a separate PR