File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,10 @@ import ONYXKEYS from '@src/ONYXKEYS';
4
4
// TODO: Remove/Update this hook once we remove the user data and migrate to account data in https://github.com/Expensify/App/issues/59277
5
5
function useAccountValidation ( ) {
6
6
// Some places are using the current value to compare, so we shouldn't cast to boolean
7
- const [ isAccountValidated ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => account ?. validated } ) ;
8
- const [ isUserValidated ] = useOnyx ( ONYXKEYS . USER , { selector : ( user ) => user ?. validated } ) ;
7
+ const [ isAccountValidated ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => account ?. validated , canBeMissing : true } ) ;
8
+ const [ isUserValidated ] = useOnyx ( ONYXKEYS . USER , { selector : ( user ) => user ?. validated , canBeMissing : true } ) ;
9
9
10
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
11
- return isAccountValidated || isUserValidated ;
10
+ return isAccountValidated ?? isUserValidated ;
12
11
}
13
12
14
13
export default useAccountValidation ;
You can’t perform that action at this time.
0 commit comments