svelte-web3 icon indicating copy to clipboard operation
svelte-web3 copied to clipboard

Saved data in stores such as selectedAccount, connected, chainId removes on refresh?

Open manishshahi1 opened this issue 2 years ago • 2 comments

I'm facing a problem in which when I am refreshing a page, the data is lost.

manishshahi1 avatar Mar 04 '22 14:03 manishshahi1

Yes, that's how store works. Data is not persistent when reloading. You will have to implement that yourself on your side. By example saving the account and connection type in localstorage and trying automatic connection when these infos are detected on reload. I'm open to have plugin implementing this but not in core package.

clbrge avatar Mar 05 '22 10:03 clbrge

I will give it a try! Thanks

manishshahi1 avatar Mar 06 '22 07:03 manishshahi1