classic-ui/modules/account/store/actions/utils.js
Danil Kovtonyuk 44f31f8b9f
init
2022-04-22 13:14:19 +10:00

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 }