Skip to content

Commit

Permalink
fix: dependency should not have default value of empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Jan 7, 2025
1 parent 46f681e commit 1ef07a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const FaceVerification = ({ screenProps, navigation }) => {
const userStorage = useUserStorage()
const { account, isFVFlow } = useContext(FVFlowContext)
const payload = useFlagWithPayload('uat-goodid-flow')
const { enabled = false, countries = '', whitelist = [] } = payload ?? {}
const { enabled = false, countries = '', whitelist = undefined } = payload ?? {}
const [isEligible] = usePromise(
() => supportedCountries(countries, whitelist, account, enabled),
[countries, whitelist, account, enabled],
Expand Down
4 changes: 3 additions & 1 deletion src/lib/wallet/GoodWalletProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { View } from 'react-native'
import { RadioButton } from 'react-native-paper'
import { t } from '@lingui/macro'
import { usePostHog } from 'posthog-react-native'

import usePromise from 'react-use-promise'

import AsyncStorage from '../utils/asyncStorage'
Expand Down Expand Up @@ -97,7 +98,8 @@ export const GoodWalletProvider = ({ children, disableLoginAndWatch = false }) =
const [hasGoodIdEnabled, setHasGoodIdEnabled] = useState(false)
const [shouldLoginAndWatch] = usePropsRefs([disableLoginAndWatch === false])
const posthog = usePostHog()
const { enabled = false, countries = '', whitelist = [] } = useFlagWithPayload('uat-goodid-flow') ?? {}
const { enabled = false, countries = '', whitelist = undefined } = useFlagWithPayload('uat-goodid-flow') ?? {}

const [isEligible] = usePromise(
() => supportedCountries(countries, whitelist, goodWallet?.account, enabled),
[countries, whitelist, goodWallet?.account, enabled],
Expand Down

0 comments on commit 1ef07a5

Please sign in to comment.