File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ import ONYXKEYS from '@src/ONYXKEYS';
3
3
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
- const [ isAccountValidated ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => ! ! account ?. validated } ) ;
7
- const [ isUserValidated ] = useOnyx ( ONYXKEYS . USER , { selector : ( user ) => ! ! user ?. validated } ) ;
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 } ) ;
8
9
9
10
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
10
11
return isAccountValidated || isUserValidated ;
You can’t perform that action at this time.
0 commit comments