safe-wallet-web
safe-wallet-web copied to clipboard
Sanitise chain-specific store entries according to supported chains
What is the feature about
We are indefinitely persisting added Safes, the address book, pinned Safe apps and likely others, regardless of currently supported chains. If chain support is deprecated, these entries remain.
As services associated with deprecation are removed, this can cause issues down the line, e.g. https://github.com/safe-global/safe-wallet-web/pull/2584. We should sanitise the local state in accordance with the supported chains. However, we need to consider that removing store entries is not reversible.
We could have a "safe read local storage" where we filter out unsupported chains whenever they are read instead of removing them from the users local storage.