fether icon indicating copy to clipboard operation
fether copied to clipboard

[light.js] Refresh chainName$ when connecting to node

Open Tbaut opened this issue 7 years ago • 3 comments

When having my own node running in the background and Fether connected to it. If I relaunch my node with a new network, Fether keeps running, it gets shortly out of "node connection", but when it connects back to the node, light.js doesn't doesn't refresh the chain and chainName$ gets wrong.

Which leads to: image

(the fact that it shows "Synced" whereas it's not synced is the topic of another issue, #273 )

Tbaut avatar Nov 23 '18 20:11 Tbaut

I think we should pretty much reset (recompute) everything when re-connecting to a node; this doesn't seem to be the case currently but it should be. I just tried launching Fether with a running instance of Parity syncing, stopping that instance and launching another instance in which Parity has already synced, and Fether was still showing "syncing" (I had to refresh the page).

This example is a bit contrived, but we could face similar issues if the user goes offline for a little bit (putting their computer on snooze for a bit while still having Fether launched for example).

axelchalon avatar Nov 26 '18 13:11 axelchalon

Hehe looks like we all got that issue now, linked to https://github.com/paritytech/fether/issues/273

Tbaut avatar Nov 26 '18 13:11 Tbaut

Not sure if that's related, for me the issue was "Node synced, but showing 'Syncing...'", and this should only happen when there's a reconnection :p (not the case for Amaury's issue afaik)

axelchalon avatar Nov 26 '18 20:11 axelchalon