classic-ui/modules/account/store/actions/removeAccount.js
FreezyEx b32527e057 Revert "minor fixes"
This reverts commit 7f8f7c2aa15c8b8c6a7449d177f46f8a417e2f67.
2022-10-13 16:03:54 +02:00

20 lines
719 B
JavaScript

export function removeAccount({ dispatch }) {
try {
dispatch('createMutation', { type: 'SET_DOMAIN_REQUEST', payload: { key: 'removeAccount' } })
dispatch('createMutation', { type: 'REMOVE_ADDRESSES' })
dispatch('createMutation', { type: 'REMOVE_KEY' })
dispatch('createMutation', { type: 'ENABLED_SAVE_FILE', payload: { isEnabled: true } })
dispatch('createMutation', { type: 'REMOVE_STATISTIC' })
this.$sessionStorage.clear()
dispatch('createMutation', { type: 'SET_DOMAIN_SUCCESS', payload: { key: 'removeAccount' } })
} catch (err) {
dispatch('createMutation', {
type: 'SET_DOMAIN_FAILED',
payload: { key: 'removeAccount', errorMessage: err.message }
})
}
}