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

15 lines
317 B
JavaScript
Raw Normal View History

2022-04-22 06:05:56 +03: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 }