File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ import ONYXKEYS from '@src/ONYXKEYS';
33
44// TODO: Remove/Update this hook once we remove the user data and migrate to account data in https://github.com/Expensify/App/issues/59277
55function 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 } ) ;
89
910 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1011 return isAccountValidated || isUserValidated ;
You can’t perform that action at this time.
0 commit comments