Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryCryptoStore probably never gets used #12555

Open
foldleft opened this issue Feb 27, 2020 · 1 comment
Open

MemoryCryptoStore probably never gets used #12555

foldleft opened this issue Feb 27, 2020 · 1 comment
Labels
T-Defect T-Task Tasks for the team like planning

Comments

@foldleft
Copy link
Contributor

foldleft commented Feb 27, 2020

I'm not convinced that LocalStorage ever falls back to a MemoryStore.

Here's how the fallback happens:

            try {
                return new LocalStorageCryptoStore(global.localStorage);
            } catch (e) {
                logger.warn(
                    `unable to open localStorage: falling back to in-memory store: ${e}`,
                );
                return new MemoryCryptoStore();
            }

Here's the constructor we expect to throw:

export class LocalStorageCryptoStore extends MemoryCryptoStore {
    constructor(webStore) {
        super();
        this.store = webStore;
    }
    ...
}
@bwindels
Copy link
Contributor

Should we update the title to MemoryCryptoStore?

@foldleft foldleft changed the title MemoryStore probably never gets used MemoryCryptoStore probably never gets used Feb 27, 2020
@jryans jryans added the T-Task Tasks for the team like planning label Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect T-Task Tasks for the team like planning
Projects
None yet
Development

No branches or pull requests

3 participants