classic-ui-dev/modules/account/store/actions/utils.js

15 lines
317 B
JavaScript
Raw Normal View History

2022-04-21 23:05:56 -04:00
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 }