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

9 lines
257 B
JavaScript

export function checkRecoveryKey({ getters, dispatch }) {
const { encrypt: address } = getters.accounts
const recoveryKey = this.$sessionStorage.getItem(address)
if (!recoveryKey && !getters.encryptedPrivateKey) {
dispatch('removeAccount')
}
}