decred / dcrdex

The Decred Decentralized Exchange (DEX), powered by atomic-swaps.
Other
187 stars 96 forks source link

eth rpc: cannot change provider while not connected #2046

Closed chappjc closed 1 year ago

chappjc commented 1 year ago

I had a single Goerli provider (ankr) that was no longer working for some reason, so I get setup with alchemy. The ETH wallet was not "connected" at the time (there was the moon icon and a Connect button), but I could do "Reconfigure". I added alchemy as a second provider and submitted. This worked and it noted a best block from alchemy. The wallet was still not connected however, so I clicked connect, which seemed to fail with the same ankr error. I went back to settings and replaced the ankr provider with alchemy, leaving the second provider blank. This seemed to work, but the wallet was still not "connected". I clicked connect, and it still made an ankr request. Going back to reconfigure, I see that there is no ankr listed, just alchemy, yet it still tries to use ankr. Restarting dexc resolved it and it seemed to forget ankr.

martonp commented 1 year ago

I'll take a look.

chappjc commented 1 year ago

I'm not sure, but I wonder if the changes to connectProvider at https://github.com/decred/dcrdex/pull/2051/files#diff-615da3d305581200b75138e9f689b8112e8f930009ccb6a65633125272b08086R363 are relevant (the continues vs returns).