clbrge / svelte-web3

web3.js library integration as a Svelte store
MIT License
138 stars 32 forks source link

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

Open manishshahi1 opened 2 years ago

manishshahi1 commented 2 years ago

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

clbrge commented 2 years ago

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.

manishshahi1 commented 2 years ago

I will give it a try! Thanks