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

9 lines
265 B
JavaScript
Raw Normal View History

2022-10-13 16:50:29 +03:00
export function checkRecoveryKey({ getters, dispatch }) {
const { encrypt: address } = getters.accounts
const recoveryKey = this.$sessionStorage.getItem(address)
if (!recoveryKey && !getters.encryptedPrivateKey) {
dispatch('removeAccount')
}
}