nova-ui/plugins/persist.ts
2022-12-04 07:02:30 +01:00

29 lines
489 B
TypeScript

import { Plugin } from '@nuxt/types'
import createPersistedState from 'vuex-persistedstate'
const persist: Plugin = ({ store, isHMR }) => {
if (isHMR) {
return
}
const paths = [
'wallet',
'relayer',
'gasPrice',
'transaction',
'application',
'account.address',
'account.balance',
'account.settings',
'account.registeredInPoolStatus',
]
createPersistedState({
key: 'tornado_pool_ui',
paths,
})(store)
}
export default persist