Merge pull request #193 from gnosis/update-localstorage-prefix

Update storage prefix key
This commit is contained in:
Mikhail Mikheev 2019-09-30 13:38:29 +04:00 committed by GitHub
commit e474f85c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
// @flow // @flow
import { ImmortalStorage, IndexedDbStore, LocalStorageStore } from 'immortal-db' import { ImmortalStorage, IndexedDbStore, LocalStorageStore } from 'immortal-db'
import { getNetwork } from '~/config'
// Don't use sessionStorage and cookieStorage // Don't use sessionStorage and cookieStorage
// https://github.com/gruns/ImmortalDB/issues/22 // https://github.com/gruns/ImmortalDB/issues/22
@ -7,7 +8,7 @@ import { ImmortalStorage, IndexedDbStore, LocalStorageStore } from 'immortal-db'
const stores = [IndexedDbStore, LocalStorageStore] const stores = [IndexedDbStore, LocalStorageStore]
export const storage = new ImmortalStorage(stores) export const storage = new ImmortalStorage(stores)
const PREFIX = 'v1' const PREFIX = `v1_${getNetwork()}`
export const loadFromStorage = async (key: string): Promise<*> => { export const loadFromStorage = async (key: string): Promise<*> => {
try { try {