relayers-network-ui/plugins/persist.ts

19 lines
390 B
TypeScript
Raw Permalink Normal View History

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