sygmaprotocol / sygma-widget

Transfer widget for the sygmaprotocol
5 stars 2 forks source link

fix: clear wallet context on disconnect #152

Closed Lykhoyda closed 3 months ago

Lykhoyda commented 3 months ago

Closes #113

The original issue, mentions NOT clear the selected and destination network. But we fetch the resource data and other data on selecting the destination network, so to avoid unclear behavior for the user to click again the destination network I clear all the data. If it's important to have the behavior to keep the state of networks, it would be better to keep at least a selected network and a clear destination network to avoid potential bugs with the data being not updated on component levels. IMO clearing the entire state is the most bulletproof way to avoid previous selected data

mpetrunic commented 3 months ago

This doesn't resolve #133. Please open new PR to address the issue.Right now if I start new transfer, source network is resetted while wallet remains connected