pickle-finance / pickle-ui

UI to interact with the PICKLE protocol
https://app.pickle.finance
51 stars 51 forks source link

Support multiple wallets under user store slice #448

Closed janklimo closed 2 years ago

janklimo commented 2 years ago

Currently, when a user switches their wallet and reloads the page, they will see their balances from the previous wallet.

This is not an issue with localStorage persistence and should be fixed in the store itself:

 interface UserState {
-  data: UserData | undefined;
+  data: {
+    [address: string]: UserData | undefined;
+  };