[INJIMOB-3319]: pass exitAppWithTimer props to decide app exist in error case for ovp same device flow (#1966)

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>
This commit is contained in:
Alka Prasad
2025-06-19 21:22:31 +05:30
committed by GitHub
parent 9ecb2f1438
commit 62ff17bf05
2 changed files with 4 additions and 6 deletions

View File

@@ -42,11 +42,7 @@ export const Error: React.FC<ErrorProps> = props => {
const [triggerExitFlow, setTriggerExitFlow] = useState(false);
useEffect(() => {
if (
props.isVisible &&
props.textButtonText === undefined &&
props.primaryButtonText === undefined
) {
if (props.exitAppWithTimer) {
const timeout = setTimeout(
() => {
setTriggerExitFlow(true);
@@ -56,7 +52,7 @@ export const Error: React.FC<ErrorProps> = props => {
return () => clearTimeout(timeout);
}
}, [props.isVisible, props.textButtonText, props.primaryButtonText]);
}, [props.exitAppWithTimer]);
useEffect(() => {
if (triggerExitFlow) {
@@ -219,4 +215,5 @@ export interface ErrorProps {
textButtonEvent?: () => void;
primaryButtonTestID?: string;
textButtonTestID?: string;
exitAppWithTimer?: boolean;
}

View File

@@ -421,6 +421,7 @@ export const SendVPScreen: React.FC<ScanLayoutProps> = props => {
textButtonEvent={handleTextButtonEvent}
customImageStyles={{paddingBottom: 0, marginBottom: -6}}
customStyles={{marginTop: '30%'}}
exitAppWithTimer={controller.isOVPViaDeepLink}
testID={'vpShareError'}
/>
</React.Fragment>