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

9 lines
257 B
JavaScript
Raw Permalink Normal View History

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