paritytech / parity-extension

Parity Chrome Extension
GNU General Public License v3.0
37 stars 14 forks source link

Clearing accounts cache when switching networks. #35

Closed tomusdrw closed 7 years ago

tomusdrw commented 7 years ago

Correctly handling disconnected status. Closes #25

Since lookup is using a pre-defined address anyway, I don't clean caches for e-mail resolutions.

ngotchac commented 7 years ago

Looks good. Unrelated to this PR, but I think the reconnection logic needs some love (look at the JS console when disconnected).

tomusdrw commented 7 years ago

If you mean this: screenshot from 2017-01-31 15-07-36

Everything here is coming from ParityBar, so it should be fixed in Parity repo (as the code is just fetched from the client)

ngotchac commented 7 years ago

I meant that : image

I think it's only when a dapp is open, and then the connection is closed (eg. on Maker Market). Not a big issue though

tomusdrw commented 7 years ago

Hmm that's weird. These are logged in background script - it should be visible only if you inspect background script, does it display for you in DevTools opened for a single website?

ngotchac commented 7 years ago

Oh yes, that's definitely in the Background script. Just thought that we might want to take a look at why these calls are made even if we are disconnected, and why 50+ Transport uninitialized error messages are printed in less than 200ms. I haven't looked at the code yet, so it might just be extra logging, which is fine. I just want to make sure that we don't make too much unnecessary requests.

tomusdrw commented 7 years ago

It's because the page you have open is trying to make those calls, but I agree that extra logging and limitting errors would be useful.