updated isFirstLogin to function to get Fresh values

This commit is contained in:
Abhinav-grd 2021-04-02 10:19:57 +05:30
parent 6f0fb87c6b
commit d22606636e
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ export default function Credentials() {
keyAttributes.keyDecryptionNonce,
kek
);
if (isFirstLogin) {
if (isFirstLogin()) {
const intermediateKeyAttribute = await generateIntermediateKey(
passphrase,
keyAttributes,

View file

@ -17,7 +17,7 @@ export function runningInBrowser() {
return typeof window !== 'undefined';
}
export const isFirstLogin = getData(LS_KEYS.IS_FIRST_LOGIN)?.status;
export const isFirstLogin = () => getData(LS_KEYS.IS_FIRST_LOGIN)?.status;
export function setIsFirstLogin(status) {
setData(LS_KEYS.IS_FIRST_LOGIN, { status });