forked from tornadocash/classic-ui
15 lines
317 B
JavaScript
15 lines
317 B
JavaScript
function createMutation({ commit, rootState }, { type, payload }) {
|
|
const { netId } = rootState.metamask
|
|
|
|
commit(type, { ...payload, netId })
|
|
}
|
|
|
|
function clearState({ dispatch }, { key }) {
|
|
dispatch('createMutation', {
|
|
type: 'CLEAR_STATE',
|
|
payload: { key }
|
|
})
|
|
}
|
|
|
|
export { clearState, createMutation }
|