diff --git a/CHANGELOG.md b/CHANGELOG.md
index 203316c85c..083012a40f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
+#### [v2.55.1-0](https://github.com/GoodDollar/GoodDAPP/compare/v2.55.0...v2.55.1-0)
+
+- add: mvp age verification [`#4331`](https://github.com/GoodDollar/GoodDAPP/pull/4331)
+- add faq link, change from included countries to excluded countries [`757a391`](https://github.com/GoodDollar/GoodDAPP/commit/757a391642db717ec90ddee2ba753787c4b42f2f)
+- - Fix faucet min balance check [`cfa61d6`](https://github.com/GoodDollar/GoodDAPP/commit/cfa61d663851b19a6535574aa566f4035c846569)
+- fix: wrong link used for faq about ngw [`c8c93ec`](https://github.com/GoodDollar/GoodDAPP/commit/c8c93ecdfd7957c6844364ad21e6159231807cc8)
+
#### [v2.55.0](https://github.com/GoodDollar/GoodDAPP/compare/v2.54.0...v2.55.0)
+> 7 January 2025
+
- fix: update deprecation dialog with welcome offer styles [`ac225b4`](https://github.com/GoodDollar/GoodDAPP/commit/ac225b41eb76c11805685e85b282d4daf9312603)
- remove welcome offer from dashboard [`0d49179`](https://github.com/GoodDollar/GoodDAPP/commit/0d491793a71eb21c9043c1c4ec6be8b289a3f755)
- fix: update goodid language files, bump gd sdks [`4fb5651`](https://github.com/GoodDollar/GoodDAPP/commit/4fb5651ac5c54441a27a992c00a585c2a6c9780e)
diff --git a/package.json b/package.json
index cc49f14794..e12529e7fc 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@gooddollar/gooddapp",
- "version": "2.55.0",
+ "version": "2.55.1-0",
"engines": {
"node": "18.x",
"npm": "9.x"
diff --git a/src/components/common/buttons/CheckBox.jsx b/src/components/common/buttons/CheckBox.jsx
index be52c64d85..a5e48fff58 100644
--- a/src/components/common/buttons/CheckBox.jsx
+++ b/src/components/common/buttons/CheckBox.jsx
@@ -1,10 +1,30 @@
import React from 'react'
+import { View } from 'react-native'
+import { CheckBox as WebCheckBox } from 'react-native-web'
+import RNCheckBox from '@react-native-community/checkbox'
+import { isMobileNative } from '../../../lib/utils/platform'
+import { withStyles } from '../../../lib/styles'
-const CheckBox = ({ onClick, children }) => (
-
+
)
-export default CheckBox
+const mapStylesToProps = () => ({
+ container: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ },
+ checkbox: {
+ width: 24,
+ height: 24,
+ marginRight: 8,
+ },
+})
+
+export default withStyles(mapStylesToProps)(CheckBox)
+
+// export default CheckBox
diff --git a/src/components/common/buttons/CheckBox.native.jsx b/src/components/common/buttons/CheckBox.native.jsx
deleted file mode 100644
index acf5af73c4..0000000000
--- a/src/components/common/buttons/CheckBox.native.jsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react'
-import { TouchableOpacity } from 'react-native'
-import { default as RNCheckBox } from '@react-native-community/checkbox'
-
-import { withStyles } from '../../../lib/styles'
-
-const CheckBox = ({ onClick, value, styles, children }) => (
-
-
- {children}
-
-)
-
-const mapStylesToProps = () => ({
- container: {
- flexDirection: 'row',
- alignItems: 'center',
- marginBottom: 24,
- },
- checkbox: {
- width: 24,
- height: 24,
- },
-})
-
-export default withStyles(mapStylesToProps)(CheckBox)
diff --git a/src/components/faceVerification/components/AgeCheckError.jsx b/src/components/faceVerification/components/AgeCheckError.jsx
new file mode 100644
index 0000000000..fa8d9d08df
--- /dev/null
+++ b/src/components/faceVerification/components/AgeCheckError.jsx
@@ -0,0 +1,88 @@
+import React, { useEffect } from 'react'
+import { View } from 'react-native'
+import { t } from '@lingui/macro'
+
+import Text from '../../common/view/Text'
+import Separator from '../../common/layout/Separator'
+import { Section } from '../../common'
+import FaceVerificationErrorSmiley from '../../common/animations/FaceVerificationErrorSmiley'
+
+import { isMobileOnly } from '../../../lib/utils/platform'
+import { getDesignRelativeHeight, getDesignRelativeWidth } from '../../../lib/utils/sizes'
+import { withStyles } from '../../../lib/styles'
+
+import { fireEvent, FV_AGECHECKERROR } from '../../../lib/analytics/analytics'
+
+const AgeCheckError = ({ styles, displayTitle, onRetry, nav, exception }) => {
+ useEffect(() => {
+ if (!exception) {
+ return
+ }
+
+ fireEvent(FV_AGECHECKERROR)
+ }, [])
+
+ return (
+
+
+ {t`You must be 18 years or older to get verified.`}
+
+
+
+
+
+
+
+
+
+
+ {t`It seems your are under 18 years of age.`}
+
+
+ {t`If you think this is a mistake
+ please contact support.`}
+
+
+
+
+
+ )
+}
+
+const getStylesFromProps = ({ theme }) => {
+ return {
+ halfIllustration: {
+ marginTop: isMobileOnly ? getDesignRelativeHeight(25) : 0,
+ marginBottom: isMobileOnly ? getDesignRelativeHeight(30) : 0,
+ width: getDesignRelativeWidth(130, false),
+ maxHeight: isMobileOnly ? getDesignRelativeHeight(97) : 'auto',
+ display: 'flex',
+ justifyContent: 'center',
+ marginRight: 0,
+ marginLeft: 0,
+ },
+ descriptionContainer: {
+ flex: 1,
+ marginBottom: 0,
+ paddingBottom: getDesignRelativeHeight(theme.sizes.defaultDouble),
+ paddingLeft: getDesignRelativeWidth(theme.sizes.default),
+ paddingRight: getDesignRelativeWidth(theme.sizes.default),
+ paddingTop: getDesignRelativeHeight(theme.sizes.default),
+ width: '100%',
+ },
+ actionsSpace: {
+ marginBottom: getDesignRelativeHeight(16),
+ },
+ errorSection: {
+ paddingBottom: 0,
+ paddingTop: 0,
+ marginBottom: 0,
+ },
+ descriptionWrapper: {
+ paddingTop: getDesignRelativeHeight(25),
+ paddingBottom: getDesignRelativeHeight(25),
+ },
+ }
+}
+
+export default withStyles(getStylesFromProps)(AgeCheckError)
diff --git a/src/components/faceVerification/components/DuplicateFoundError.jsx b/src/components/faceVerification/components/DuplicateFoundError.jsx
index a04dfadac8..db8dbca387 100644
--- a/src/components/faceVerification/components/DuplicateFoundError.jsx
+++ b/src/components/faceVerification/components/DuplicateFoundError.jsx
@@ -1,7 +1,8 @@
-import React, { useEffect } from 'react'
-import { View } from 'react-native'
+import React, { useCallback, useEffect } from 'react'
+import { Linking, View } from 'react-native'
import { t } from '@lingui/macro'
-
+import { get } from 'lodash'
+import moment from 'moment'
import Text from '../../common/view/Text'
import { Section } from '../../common'
@@ -13,6 +14,12 @@ import FVErrorTwinSVG from '../../../assets/FaceVerification/FVErrorTwin.svg'
import { fireEvent, FV_DUPLICATEERROR } from '../../../lib/analytics/analytics'
const DuplicateFoundError = ({ styles, displayTitle, onRetry, nav, exception }) => {
+ const onLearnMore = useCallback(() => {
+ Linking.openURL('https://docs.gooddollar.org/frequently-asked-questions/troubleshooting#help-it-says-i-have-a-twin')
+ }, [])
+
+ const expiration = get(exception, 'response.enrollmentResult.duplicate.expiration')
+
useEffect(() => {
if (!exception) {
return
@@ -29,23 +36,38 @@ const DuplicateFoundError = ({ styles, displayTitle, onRetry, nav, exception })
{displayTitle}
)}
- {(displayTitle ? `,\n` : '') +
- t`Unfortunately we found
- your twin...`}
+ {(displayTitle ? `,\n` : '') + t`We found your twin...`}
-
-
- {t`You can open ONLY ONE account
+
+ {t`You can verify ONLY ONE wallet address
per person. `}
-
-
- {t`If this is your only active
- account - please contact our support`}
-
+
+
+ {t`If this is your only active
+ account - please contact support.`}
+ {expiration && (
+
+
+ {t`The existing identity will expire on ${moment(expiration).format('l')}.
+ After this expiry, you may verify a different wallet address.`}
+
+
+ {t`Learn More`}
+
+
+ )}
diff --git a/src/components/faceVerification/components/ErrorButtons.jsx b/src/components/faceVerification/components/ErrorButtons.jsx
index 4918d7f85d..eaa2d30264 100644
--- a/src/components/faceVerification/components/ErrorButtons.jsx
+++ b/src/components/faceVerification/components/ErrorButtons.jsx
@@ -11,22 +11,27 @@ import { withStyles } from '../../../lib/styles'
const { fvTypeformUrl } = Config
-const ErrorButtons = ({ styles, screenProps, navigation, onRetry, reachedMax }) => {
+const ErrorButtons = ({ styles, screenProps, navigation, onRetry, reachedMax, invert = false }) => {
const onContactSupport = useCallback(() => openLink(fvTypeformUrl), [])
return (
{!reachedMax ? (
-
-
+
+
TRY AGAIN
-
+
{t`CONTACT SUPPORT`}
) : (
-
+
+
+
+ TRY AGAIN
+
+
)}
)
@@ -37,6 +42,7 @@ const getStylesFromProps = ({ theme }) => ({
width: '100%',
},
actionsSpace: {
+ marginTop: 10, //native design fix
marginBottom: getDesignRelativeHeight(16),
},
})
diff --git a/src/components/faceVerification/components/Instructions.jsx b/src/components/faceVerification/components/Instructions.jsx
index b95e3318c2..25c552222a 100644
--- a/src/components/faceVerification/components/Instructions.jsx
+++ b/src/components/faceVerification/components/Instructions.jsx
@@ -12,7 +12,7 @@ import { CustomButton, Section, Wrapper } from '../../common'
import { getDesignRelativeHeight, getDesignRelativeWidth, isLargeDevice } from '../../../lib/utils/sizes'
import normalize from '../../../lib/utils/normalizeText'
import { withStyles } from '../../../lib/styles'
-import { isBrowser } from '../../../lib/utils/platform'
+import { isBrowser, isMobile } from '../../../lib/utils/platform'
// assets
import illustration from '../../../assets/FRInstructions.png'
@@ -32,26 +32,42 @@ const Dot = () => (
)
-const Instructions = ({ styles, onDismiss = noop, ready }) => (
+const Instructions = ({ styles, onDismiss = noop, ready, fvStarted = false }) => (
-
-
-
- {t`Hold Your Camera at Eye Level`}
-
-
-
- {t`Light Your Face Evenly`}
-
-
-
- {t`Avoid Smiling & Back Light`}
-
-
+ {!fvStarted ? (
+
+ {!isMobile && (
+
+
+ {t`Face Directly In Front of the Camera`}
+
+ )}
+
+
+ {t`Hold Your Camera at Eye Level`}
+
+
+
+ {t`Light Your Face Evenly`}
+
+
+
+ {t`Avoid Smiling & Back Light`}
+
+
+ ) : (
+
+ {t`Notice:
+ Face verifying for someone else's use is against the terms & service policy.`}
+ {t`Doing so may result in a loss of funds and/or your account being blocked.`}
+
+ )}
({
flexDirection: 'column',
alignItems: 'flex-start',
},
+ warnDescriptionWrapper: {
+ flexDirection: 'column',
+ alignItems: 'center',
+ },
descriptionWrapperB: {
backgroundColor: theme.colors.darkGray,
borderRadius: 8,
@@ -136,6 +156,13 @@ const getStylesFromProps = ({ theme }) => ({
fontSize: normalize(isLargeDevice ? 22 : 20),
lineHeight: isLargeDevice ? 36 : 34,
},
+ warnText: {
+ // textAlign: 'center',
+ fontSize: normalize(isLargeDevice ? 22 : 20),
+ lineHeight: isLargeDevice ? 36 : 34,
+ fontWeight: 'bold',
+ color: theme.colors.red,
+ },
textB: {
textAlign: 'left',
fontSize: 16,
diff --git a/src/components/faceVerification/hooks/useFaceTecVerification.js b/src/components/faceVerification/hooks/useFaceTecVerification.js
index 3befb7182c..276260290a 100644
--- a/src/components/faceVerification/hooks/useFaceTecVerification.js
+++ b/src/components/faceVerification/hooks/useFaceTecVerification.js
@@ -125,6 +125,8 @@ export default (options = null) => {
name = 'DuplicateFoundError'
} else if (/face.+n.t\s+match/.test(message)) {
name = 'NotMatchError'
+ } else if (/age check failed/.test(message)) {
+ name = 'AgeCheckError'
} else {
// the following code is needed to categorize exceptions
// then we could display specific error messages
diff --git a/src/components/faceVerification/screens/ErrorScreen.jsx b/src/components/faceVerification/screens/ErrorScreen.jsx
index 89af6804d1..3b2db0e30a 100644
--- a/src/components/faceVerification/screens/ErrorScreen.jsx
+++ b/src/components/faceVerification/screens/ErrorScreen.jsx
@@ -9,6 +9,7 @@ import NotMatchError from '../components/NotMatchError'
import GeneralError from '../components/GeneralError'
import UnrecoverableError from '../components/UnrecoverableError'
import SwitchToAnotherDevice from '../components/SwitchToAnotherDevice'
+import AgeCheckError from '../components/AgeCheckError'
import useVerificationAttempts from '../hooks/useVerificationAttempts'
@@ -55,7 +56,7 @@ const ErrorScreen = ({ styles, screenProps, navigation }) => {
return getFirstWord(fullName)
}, [profile])
- const onRetry = useCallback(() => screenProps.navigateTo('FaceVerificationIntro'), [screenProps])
+ const onRetry = useCallback(() => screenProps.navigateTo('FaceVerification'), [screenProps])
useEffectOnce(() => {
// determining error component to display
@@ -90,13 +91,19 @@ const ErrorScreen = ({ styles, screenProps, navigation }) => {
isFVFlow={isFVFlow}
reachedMax={reachedMax}
/>
-
+
)
}
ErrorScreen.kindOfTheIssue = {
+ AgeCheckError,
NotMatchError,
UnrecoverableError,
DuplicateFoundError,
diff --git a/src/components/faceVerification/screens/IntroScreen.jsx b/src/components/faceVerification/screens/IntroScreen.jsx
index 5cb9cd8e9d..1ee5fac821 100644
--- a/src/components/faceVerification/screens/IntroScreen.jsx
+++ b/src/components/faceVerification/screens/IntroScreen.jsx
@@ -1,8 +1,9 @@
// libraries
-import React, { useCallback, useContext, useEffect, useMemo } from 'react'
+import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'
import { ActivityIndicator, Image, Platform, View } from 'react-native'
import { t } from '@lingui/macro'
import { useIdentityExpiryDate } from '@gooddollar/web3sdk-v2'
+import moment from 'moment'
import useFVRedirect from '../standalone/hooks/useFVRedirect'
@@ -25,6 +26,7 @@ import { getFirstWord } from '../../../lib/utils/getFirstWord'
import {
getDesignRelativeHeight,
getDesignRelativeWidth,
+ isLargeDevice,
isMediumDevice,
isSmallDevice,
} from '../../../lib/utils/sizes'
@@ -48,6 +50,7 @@ import FashionShootSVG from '../../../assets/FaceVerification/FashionPhotoshoot.
import BillyVerifies from '../../../assets/billy-verifies.png'
import useProfile from '../../../lib/userStorage/useProfile'
import useFVLoginInfoCheck from '../standalone/hooks/useFVLoginInfoCheck'
+import CheckBox from '../../common/buttons/CheckBox'
const log = logger.child({ from: 'FaceVerificationIntro' })
@@ -86,7 +89,7 @@ const IntroReVerification = ({ styles, firstName, ready, onVerify, onLearnMore }
{t`Every so often, it's necessary to double-check that you're still you. You’ll go through the same verification process you went through when you first signed up for GoodDollar.`}
- {t`You’ll be able to claim once this process is complete.`}
+ {t`You’ll be able to continue once this process is complete.`}
@@ -110,47 +113,66 @@ const IntroReVerification = ({ styles, firstName, ready, onVerify, onLearnMore }
)
-const Intro = ({ styles, firstName, ready, onVerify, onLearnMore }) => (
-
-
-
-
- {firstName ? `${firstName},` : ``}
-
- {firstName ? `\n` : ''}
- {t`You are almost there!`}
- {`\n`}
+const Intro = ({ styles, firstName, ready, onVerify, onLearnMore, authPeriod }) => {
+ const [ageConfirmed, setAgeConfirmed] = useState(false)
+ return (
+
+
+
+
+ {firstName ? `${firstName},` : ``}
+
+ {firstName ? `\n` : ''}
+ {t`You are almost there!`}
+ {`\n`}
+
+
+ {t`To continue, you need to prove you are a unique human.`}
+
+ {t`Your image is only used to ensure you’re you and prevent duplicate accounts.`}
-
- {t`To claim G$, you need to be a unique human and prove it with your camera.`}
-
- {t`Your image is only used to ensure you’re you and prevent duplicate accounts.`}
-
-
- {t`Learn More`}
-
-
-
+
+ {t`This wallet address will be connected to your identity until ${moment().add(authPeriod, 'days').format('l')}.
+ If you’d prefer to verify a different wallet address, please use a different wallet.`}
+
+
+ {t`Learn More`}
+
+
+
+
+
+
+ {
+ setAgeConfirmed(v)
+ }}
+ value={ageConfirmed}
+ >
+ I confirm I'm over 18 years of age
+
+
+
+ {t`OK, Verify me`}
+
+
-
- {t`OK, VERIFY ME`}
-
-
-
-
-)
+
+
+ )
+}
const IntroScreen = ({ styles, screenProps, navigation }) => {
const { fullName } = useProfile()
@@ -160,8 +182,8 @@ const IntroScreen = ({ styles, screenProps, navigation }) => {
const goodWallet = useWallet()
const { account } = goodWallet ?? {}
const [expiryDate, , state] = useIdentityExpiryDate(externalAccount || account)
-
const isReverify = expiryDate?.lastAuthenticated?.isZero() === false
+ const authPeriod = expiryDate?.authPeriod?.toNumber() || 360
const { goToRoot, navigateTo, push } = screenProps
const fvRedirect = useFVRedirect()
@@ -171,27 +193,31 @@ const IntroScreen = ({ styles, screenProps, navigation }) => {
[isFVFlow, firstName, fullName],
)
- const [disposing, checkDisposalState] = useDisposingState(
- {
- requestOnMounted: false,
- enrollmentIdentifier,
- fvSigner,
- onComplete: isDisposing => {
- if (!isDisposing) {
- return
- }
-
- const dialogData = showQueueDialog(WalletDeletedPopupText, true, {
- onDismiss: isFVFlow ? () => fvRedirect(false, 'Wait 24 hours') : goToRoot,
- imageSource: Wait24HourSVG,
- })
-
- showDialog(dialogData)
- },
+ const onDeny = useCallback(
+ reason => {
+ return isFVFlow ? fvRedirect(false, reason) : goToRoot()
},
- [enrollmentIdentifier],
+ [isFVFlow],
)
+ const [disposing, checkDisposalState] = useDisposingState({
+ requestOnMounted: false,
+ enrollmentIdentifier,
+ fvSigner,
+ onComplete: isDisposing => {
+ if (!isDisposing) {
+ return
+ }
+
+ const dialogData = showQueueDialog(WalletDeletedPopupText, true, {
+ onDismiss: () => onDeny('Wait 24 hours'),
+ imageSource: Wait24HourSVG,
+ })
+
+ showDialog(dialogData)
+ },
+ })
+
const openPrivacy = useOnPress(() => openLink(Config.faceVerificationPrivacyUrl), [])
const openFaceVerification = useCallback(() => push('FaceVerification'), [push])
@@ -267,7 +293,9 @@ const IntroScreen = ({ styles, screenProps, navigation }) => {
firstName={userName}
onLearnMore={openPrivacy}
onVerify={handleVerifyClick}
+ onDeny={onDeny}
ready={false === disposing}
+ authPeriod={authPeriod}
/>
)
}
@@ -295,7 +323,7 @@ const getStylesFromProps = ({ theme }) => ({
flexGrow: 1,
justifyContent: 'space-between',
paddingHorizontal: Platform.select({
- web: !isMediumDevice ? 32 : 0,
+ web: !isMediumDevice ? 8 : 0,
}),
width: '100%',
},
@@ -356,6 +384,9 @@ const getStylesFromProps = ({ theme }) => ({
color: theme.colors.primary,
marginTop: getDesignRelativeHeight(isSmallDevice ? theme.sizes.defaultDouble : 20),
},
+ buttonContainer: {
+ marginTop: !isLargeDevice ? 50 : 0,
+ },
})
export default withStyles(getStylesFromProps)(IntroScreen)
diff --git a/src/components/faceVerification/screens/VerificationScreen.jsx b/src/components/faceVerification/screens/VerificationScreen.jsx
index d8f32396e7..cadef36a34 100644
--- a/src/components/faceVerification/screens/VerificationScreen.jsx
+++ b/src/components/faceVerification/screens/VerificationScreen.jsx
@@ -1,4 +1,4 @@
-import React, { useCallback, useContext, useMemo } from 'react'
+import React, { useCallback, useContext, useMemo, useState } from 'react'
import { identity } from 'lodash'
import usePromise from 'react-use-promise'
@@ -35,6 +35,7 @@ import { supportedCountries } from '../../../lib/utils/supportedCountries'
const log = logger.child({ from: 'FaceVerification' })
const FaceVerification = ({ screenProps, navigation }) => {
+ const [fvStarted, setFVStarted] = useState()
const { attemptsCount, trackAttempt, resetAttempts } = useVerificationAttempts()
const goodWallet = useWallet()
const userStorage = useUserStorage()
@@ -197,6 +198,7 @@ const FaceVerification = ({ screenProps, navigation }) => {
}
fireEvent(FV_START)
+ setFVStarted(true)
startVerification()
}, [startVerification, enrollmentIdentifier])
@@ -210,7 +212,7 @@ const FaceVerification = ({ screenProps, navigation }) => {
// othwerise page will stuck on 'loading' "GOT IT" button
useFVLoginInfoCheck(navigation)
- return
+ return
}
export default FaceVerification
diff --git a/src/components/faceVerification/sdk/EnrollmentProcessor.web.js b/src/components/faceVerification/sdk/EnrollmentProcessor.web.js
index 5d4d9af7ef..9843ec678d 100644
--- a/src/components/faceVerification/sdk/EnrollmentProcessor.web.js
+++ b/src/components/faceVerification/sdk/EnrollmentProcessor.web.js
@@ -16,6 +16,8 @@ export class EnrollmentProcessor {
lastMessage = null
+ lastResponse = null
+
enrollmentIdentifier = null
v1Identifier = null
@@ -51,7 +53,7 @@ export class EnrollmentProcessor {
async onFaceTecSDKCompletelyDone() {
const FaceTecSDK = await this.FaceTecSDK
const { FaceTecSessionStatus, getFriendlyDescriptionForFaceTecSessionStatus } = FaceTecSDK
- const { subscriber, isSuccess, lastMessage, lastResult } = this
+ const { subscriber, isSuccess, lastMessage, lastResult, lastResponse = {} } = this
const { status } = lastResult || {}
let latestMessage = lastMessage
@@ -65,7 +67,7 @@ export class EnrollmentProcessor {
}
// calling completion callback
- subscriber.onSessionCompleted(isSuccess, lastResult, latestMessage)
+ subscriber.onSessionCompleted(isSuccess, lastResult, latestMessage, lastResponse)
}
/**
@@ -159,7 +161,7 @@ export class EnrollmentProcessor {
// setting lastMessage from exception's message
// if response was sent - it will contain message from server
this.lastMessage = message
-
+ this.lastResponse = response
if (response) {
// if error response was sent
const { enrollmentResult } = response
diff --git a/src/components/faceVerification/sdk/ProcessingSubscriber.web.js b/src/components/faceVerification/sdk/ProcessingSubscriber.web.js
index cc6f7a7e09..4ee45f9e34 100644
--- a/src/components/faceVerification/sdk/ProcessingSubscriber.web.js
+++ b/src/components/faceVerification/sdk/ProcessingSubscriber.web.js
@@ -17,7 +17,7 @@ export class ProcessingSubscriber {
return this._promise
}
- onSessionCompleted(isSuccess, lastResult, lastMessage) {
+ onSessionCompleted(isSuccess, lastResult, lastMessage, lastResponse = {}) {
const { logger, _resolve, _reject } = this
const logRecord = { isSuccess, lastMessage }
@@ -33,7 +33,7 @@ export class ProcessingSubscriber {
}
const exception = new Error(lastMessage)
-
+ exception.response = lastResponse
if (lastResult) {
exception.code = lastResult.status
}
diff --git a/src/components/faceVerification/standalone/hooks/useGiveUpDialog.jsx b/src/components/faceVerification/standalone/hooks/useGiveUpDialog.jsx
index 51ab38abd5..b0c101c324 100644
--- a/src/components/faceVerification/standalone/hooks/useGiveUpDialog.jsx
+++ b/src/components/faceVerification/standalone/hooks/useGiveUpDialog.jsx
@@ -16,13 +16,13 @@ const useGiveUpDialog = (navigation, type) => {
const fvRedirect = useFVRedirect()
const { isFVFlow } = useContext(FVFlowContext)
const { navigate } = navigation
- const { fvTypeformUrl } = Config
+ const { fvTypeformUrl, showFVSurvey } = Config
const onReasonChosen = useCallback(
(reason = undefined) => {
const data = pickBy({ reason }, negate(isUndefined))
- if (reason !== 'closed') {
+ if (reason && reason !== 'closed') {
AsyncStorage.removeItem('hasStartedFV')
fireEvent(FV_GIVEUP, { data, surveyType: type })
}
@@ -43,14 +43,16 @@ const useGiveUpDialog = (navigation, type) => {
)
const onGiveUp = useCallback(() => {
- showDialog({
- content: ,
- isMinHeight: false,
- showButtons: false,
- showCloseButtons: false,
-
- onDismiss: onReasonChosen,
- })
+ showFVSurvey
+ ? showDialog({
+ content: ,
+ isMinHeight: false,
+ showButtons: false,
+ showCloseButtons: false,
+
+ onDismiss: onReasonChosen,
+ })
+ : onReasonChosen()
}, [showDialog, onReasonChosen])
return { onGiveUp }
diff --git a/src/components/permissions/components/CameraPermissionDialog.jsx b/src/components/permissions/components/CameraPermissionDialog.jsx
index eae612cb00..da4e911e5b 100644
--- a/src/components/permissions/components/CameraPermissionDialog.jsx
+++ b/src/components/permissions/components/CameraPermissionDialog.jsx
@@ -10,7 +10,7 @@ export default ({ onDismiss }) => {
return (