updated to re-set token only if encryptedToken is not null

This commit is contained in:
Abhinav-grd 2021-06-12 16:00:59 +05:30
parent 58f6ff808d
commit 4cc2099373

View file

@ -159,11 +159,11 @@ export async function decryptAndStoreToken(masterKey: string) {
keyAttributes.publicKey,
secretKey,
);
setData(LS_KEYS.USER, {
...user,
token: decryptedToken,
encryptedToken: null,
});
}
setData(LS_KEYS.USER, {
...user,
token: decryptedToken,
encryptedToken: null,
});
}
export default CryptoWorker;