Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inji 536 check status failed while downloading vc #1000

Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f7e1df0
fix(INJI-536):check status failed while downloading vc
srikanth716 Nov 3, 2023
8587091
fix(INJI-536):refactor the default switch case
srikanth716 Nov 6, 2023
75b2724
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 6, 2023
b3accb1
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 6, 2023
101020c
fix(INJI-536):fix error handling and avoid usage of VCmetadata
srikanth716 Nov 6, 2023
96e7d0c
fix(INJI-536):fix error handling and avoid usage of VCmetadata
srikanth716 Nov 6, 2023
36d55bc
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 9, 2023
c29fcda
fix(INJI-536):refactor verifyingDownloadLimitExpiry state
srikanth716 Nov 9, 2023
6ff3f98
Merge branch 'develop' of https://github.com/mosip/inji into inji-427…
srikanth716 Nov 17, 2023
d793b81
Merge branch 'develop' of https://github.com/mosip/inji into inji-427…
srikanth716 Nov 17, 2023
5f43a8a
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 17, 2023
390ee6e
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 17, 2023
67375d7
Revert fix(INJI-536):refactor verifyingDownloadLimitExpiry state
srikanth716 Nov 17, 2023
ca1824b
Merge branch 'develop' of https://github.com/mosip/inji into inji-536…
srikanth716 Nov 23, 2023
b3118f8
fix(INJI-536): refactor the Check Status FAILED
srikanth716 Nov 23, 2023
5dadd47
fix(INJI): increase app retention time in actions (#988)
adityankannan-tw Nov 3, 2023
3d5bb22
(Inji-533): fix app crash by adding null check before decrypt json (#…
tilak-puli Nov 3, 2023
67259cd
fix(INJI-362): fix first time logout navigation to language selection…
adityankannan-tw Nov 6, 2023
224f1cc
feat(Inji-436): add telemetry events for app triggered warnings (#986)
PuBHARGAVI Nov 6, 2023
cd49c83
fix(INJI-536):fix error handling and avoid usage of VCmetadata
srikanth716 Nov 6, 2023
5629546
fix(INJI-536):fix error handling and avoid usage of VCmetadata
srikanth716 Nov 6, 2023
23ddcce
Inji 299 show cancel Popup for ios (#980)
PoojaBabusing Nov 6, 2023
da353c3
[Inji 434 & INJI 441]: Add events in receiver VC sharing flow and can…
Alka1703 Nov 7, 2023
538da2b
MOSIP-30183 | test cases automated from master sheet (#991)
kamalsinghthoughtworks Nov 7, 2023
cd178b9
MOSIP-30082 MOSIP-30054 (#983)
anup-nehe Nov 7, 2023
cc16034
feat(INJI-299): add service prop to walletBinding and getVc (#993)
PoojaBabusing Nov 8, 2023
108b3e7
feat(inji-411): Remove caching for vc files (#995)
tilak-puli Nov 8, 2023
c2372fb
fix(INJI-536):check status failed while downloading vc (#985)
srikanth716 Nov 8, 2023
35330e3
fix(INJI-536):check status failed while downloading vc (#985)
srikanth716 Nov 8, 2023
6fa72dc
fix(INJI-536):refactor verifyingDownloadLimitExpiry state
srikanth716 Nov 9, 2023
8b4aca9
MOSIP-28901 | Regression test cases added for android (#1001)
kamalsinghthoughtworks Nov 10, 2023
b3e6278
fix(INJI-552): handle biometric reject on vc download (#1003)
KiruthikaJeyashankar Nov 16, 2023
d84bd9e
Fix(INJI-546): Button name in Status page is changed to OK thus fixed…
Anil-kumar-Majji Nov 16, 2023
9b9b9ae
fix(INJI-367): remove unused permissions (#1008)
sree96 Nov 16, 2023
8e71acc
fix(inji-522): enable the location service before initiating the vc s…
vijay151096 Nov 16, 2023
03bdc81
MOSIP-30292 | New regression test cases added (#1011)
kamalsinghthoughtworks Nov 16, 2023
4aa055d
Fix sharing screen progress modal in IOS (#1005)
adityankannan-tw Nov 16, 2023
fc8b79d
feat(INJI-560): add error events at multiple places to catch the erro…
Alka1703 Nov 16, 2023
19f7d5d
Revert fix(INJI-536):refactor verifyingDownloadLimitExpiry state
srikanth716 Nov 17, 2023
905129b
feat(INJI-474): show popup for invalid QR (#999)
adityankannan-tw Nov 20, 2023
f280ed9
Fix: (Inji-261): Most of the elements which are still in orange in th…
Anil-kumar-Majji Nov 20, 2023
39a4adc
MOSIP-30340 | Regression test for IOS added (#1023)
kamalsinghthoughtworks Nov 20, 2023
e268330
Credential Registry testcases, help page new test cases added , MOSIP…
anup-nehe Nov 21, 2023
488d364
fix(INJI-536): refactor the Check Status FAILED
srikanth716 Nov 23, 2023
a47acb0
fix(INJI-536):refactor check status failed
srikanth716 Nov 23, 2023
c691196
Merge branch 'inji-536-check-status-failed-while-downloading-vc' of h…
srikanth716 Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Inji 299 show cancel Popup for ios (#980)
* feat(INJI-299): show cancel download popup for ios

Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>

* feat(INJI-299): move translations from addVCModal to otpVerificationModal

Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>

---------

Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>
Co-authored-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>
  • Loading branch information
2 people authored and srikanth716 committed Nov 23, 2023
commit 23ddccec97f0351b7054cdf11e9c6d0e1641adc2
14 changes: 7 additions & 7 deletions locales/ara.json
Original file line number Diff line number Diff line change
@@ -205,12 +205,6 @@
},
"AddVcModal": {
"requestingCredential": "جارٍ طلب بيانات الاعتماد...",
"confirmationDialog": {
"title": "هل تريد إلغاء التنزيل؟",
"message": "بمجرد الإلغاء، لن يتم تنزيل بطاقتك وستحتاج إلى إعادة بدء التنزيل.",
"wait": "لا، سأنتظر",
"cancel": "نعم، إلغاء"
},
"errors": {
"input": {
"empty": "فارغًا",
@@ -275,7 +269,13 @@
"title": "التحقق من OTP",
"otpSentMessage": "لقد أرسلنا الرمز المكون من 6 أرقام إلى رقم هاتفك المحمول المسجل!",
"resendTheCode": "يمكنك إعادة إرسال الرمز بتنسيق ",
"resendCode": "أعد إرسال الرمز"
"resendCode": "أعد إرسال الرمز",
"confirmationDialog": {
"title": "هل تريد إلغاء التنزيل؟",
"message": "بمجرد الإلغاء، لن يتم تنزيل بطاقتك وستحتاج إلى إعادة بدء التنزيل.",
"wait": "لا، سأنتظر",
"cancel": "نعم، إلغاء"
}
},
"MyVcsTab": {
"bringYourDigitalID": "أحضر هويتك الرقمية",
14 changes: 7 additions & 7 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -206,12 +206,6 @@
},
"AddVcModal": {
"requestingCredential": "Requesting credential...",
"confirmationDialog": {
"title": "Do you want to cancel downloading?",
"message": "Once cancelled, your card will not be downloaded and you need to reinitiate the download.",
"wait": "No, I’ll wait",
"cancel": "Yes, Cancel"
},
"errors": {
"input": {
"empty": "The input cannot be empty",
@@ -276,7 +270,13 @@
"title": "OTP Verification",
"otpSentMessage": "We've sent the 6 digit code to your registered mobile number!",
"resendTheCode": "You can resend the code in ",
"resendCode": "Resend Code"
"resendCode": "Resend Code",
"confirmationDialog": {
"title": "Do you want to cancel downloading?",
"message": "Once cancelled, your card will not be downloaded and you need to reinitiate the download.",
"wait": "No, I’ll wait",
"cancel": "Yes, Cancel"
}
},
"MyVcsTab": {
"bringYourDigitalID": "Bring your digital identity",
14 changes: 7 additions & 7 deletions locales/fil.json
Original file line number Diff line number Diff line change
@@ -204,12 +204,6 @@
},
"AddVcModal": {
"requestingCredential": "Humihiling ng kredensyal...",
"confirmationDialog": {
"title": "Gusto mo bang kanselahin ang pag-download?",
"message": "Kapag nakansela, hindi na mada-download ang iyong card at kailangan mong simulan muli ang pag-download.",
"wait": "Hindi, maghihintay ako",
"cancel": "Oo, Kanselahin"
},
"errors": {
"input": {
"empty": "Hindi maaaring walang laman ang input",
@@ -274,7 +268,13 @@
"title": "Pag-verify ng OTP",
"otpSentMessage": "Ipinadala namin ang 6 na digit na code sa iyong rehistradong mobile number!",
"resendTheCode": "Maaari mong ipadala muli ang code sa ",
"resendCode": "Ipadala muli ang Code"
"resendCode": "Ipadala muli ang Code",
"confirmationDialog": {
"title": "Gusto mo bang kanselahin ang pag-download?",
"message": "Kapag nakansela, hindi na mada-download ang iyong card at kailangan mong simulan muli ang pag-download.",
"wait": "Hindi, maghihintay ako",
"cancel": "Oo, Kanselahin"
}
},
"MyVcsTab": {
"bringYourDigitalID": "Dalhin ang Iyong Digital ID",
14 changes: 7 additions & 7 deletions locales/hin.json
Original file line number Diff line number Diff line change
@@ -202,12 +202,6 @@
},
"AddVcModal": {
"requestingCredential": "क्रेडेंशियल का अनुरोध कर रहा है...",
"confirmationDialog": {
"title": "क्या आप डाउनलोडिंग रद्द करना चाहते हैं?",
"message": "एक बार रद्द होने पर, आपका कार्ड डाउनलोड नहीं किया जाएगा और आपको डाउनलोड फिर से शुरू करना होगा।",
"wait": "नहीं, मैं इंतजार करूंगा",
"cancel": "हाँ, रद्द करें"
},
"errors": {
"input": {
"empty": "इनपुट खाली नहीं हो सकता",
@@ -272,7 +266,13 @@
"title": "ओटीपी सत्यापन",
"otpSentMessage": "हमने आपके पंजीकृत मोबाइल नंबर पर 6 अंकों का कोड भेज दिया है!",
"resendTheCode": "आप कोड को फिर से भेज सकते हैं ",
"resendCode": "पुन: कोड भेजे"
"resendCode": "पुन: कोड भेजे",
"confirmationDialog": {
"title": "क्या आप डाउनलोडिंग रद्द करना चाहते हैं?",
"message": "एक बार रद्द होने पर, आपका कार्ड डाउनलोड नहीं किया जाएगा और आपको डाउनलोड फिर से शुरू करना होगा।",
"wait": "नहीं, मैं इंतजार करूंगा",
"cancel": "हाँ, रद्द करें"
}
},
"MyVcsTab": {
"downloadCard": "डाउनलोड कार्ड",
14 changes: 7 additions & 7 deletions locales/spa.json
Original file line number Diff line number Diff line change
@@ -117,12 +117,6 @@
},
"AddVcModal": {
"requestingCredential": "Solicitando credencial...",
"confirmationDialog": {
"title": "Quieres cancelar la descarga?",
"message": "OUna vez cancelada, su tarjeta no se descargará y deberá reiniciar la descarga.",
"wait": "No, esperaré",
"cancel": "Sí, cancelar"
},
"errors": {
"input": {
"empty": "El campo no puede estar vacío",
@@ -179,7 +173,13 @@
},
"OtpVerificationModal": {
"enterOtp": "Ingresa el código de verificación de 6 dígitos que te hemos enviado",
"header": "Verificación de OTP"
"header": "Verificación de OTP",
"confirmationDialog": {
"title": "Quieres cancelar la descarga?",
"message": "OUna vez cancelada, su tarjeta no se descargará y deberá reiniciar la descarga.",
"wait": "No, esperaré",
"cancel": "Sí, cancelar"
}
},
"MyVcsTab": {
"addVcButton": "Agregar Tarjeta",
14 changes: 7 additions & 7 deletions locales/tam.json
Original file line number Diff line number Diff line change
@@ -201,12 +201,6 @@
},
"AddVcModal": {
"requestingCredential": "நற்சான்றிதழைக் கோருகிறது...",
"confirmationDialog": {
"title": "பதிவிறக்குவதை ரத்துசெய்ய விரும்புகிறீர்களா?",
"message": "ரத்துசெய்யப்பட்டதும், உங்கள் கார்டு பதிவிறக்கம் செய்யப்படாது மேலும் நீங்கள் பதிவிறக்கத்தை மீண்டும் தொடங்க வேண்டும்.",
"wait": "இல்லை, நான் காத்திருப்பேன்",
"cancel": "ஆம், ரத்துசெய்"
},
"errors": {
"input": {
"empty": "உள்ளீடு காலியாக இருக்க முடியாது",
@@ -271,7 +265,13 @@
"title": "OTP சரிபார்ப்பு",
"otpSentMessage": "உங்கள் பதிவு செய்யப்பட்ட மொபைல் எண்ணுக்கு 6 இலக்கக் குறியீட்டை அனுப்பியுள்ளோம்!",
"resendTheCode": "நீங்கள் குறியீட்டை மீண்டும் அனுப்பலாம் ",
"resendCode": "குறியீட்டை மீண்டும் அனுப்பு"
"resendCode": "குறியீட்டை மீண்டும் அனுப்பு",
"confirmationDialog": {
"title": "பதிவிறக்குவதை ரத்துசெய்ய விரும்புகிறீர்களா?",
"message": "ரத்துசெய்யப்பட்டதும், உங்கள் கார்டு பதிவிறக்கம் செய்யப்படாது மேலும் நீங்கள் பதிவிறக்கத்தை மீண்டும் தொடங்க வேண்டும்.",
"wait": "இல்லை, நான் காத்திருப்பேன்",
"cancel": "ஆம், ரத்துசெய்"
}
},
"MyVcsTab": {
"bringYourDigitalID": "உங்கள் டிஜிட்டல் ஐடியைக் கொண்டு வாருங்கள்",
27 changes: 2 additions & 25 deletions screens/Home/MyVcs/AddVcModal.tsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import {IdInputModal} from './IdInputModal';
import {useTranslation} from 'react-i18next';
import {GET_INDIVIDUAL_ID} from '../../../shared/constants';
import {TelemetryConstants} from '../../../shared/telemetry/TelemetryUtils';
import {Button, Column} from '../../../components/ui';

export const AddVcModal: React.FC<AddVcModalProps> = props => {
const {t} = useTranslation('AddVcModal');
@@ -16,10 +15,7 @@ export const AddVcModal: React.FC<AddVcModalProps> = props => {
if (controller.isRequestingCredential) {
GET_INDIVIDUAL_ID({id: '', idType: 'UIN'});
}
return (
(!controller.isAcceptingOtpInput && !controller.isRequestingCredential) ||
!controller.isDownloadCancelled
);
return controller.isAcceptingUinInput;
};

const dismissIdInputModal = () => {
@@ -38,6 +34,7 @@ export const AddVcModal: React.FC<AddVcModalProps> = props => {

{(controller.isAcceptingOtpInput || controller.isDownloadCancelled) && (
<OtpVerificationModal
service={props.service}
isVisible={
controller.isAcceptingOtpInput || controller.isDownloadCancelled
}
@@ -54,26 +51,6 @@ export const AddVcModal: React.FC<AddVcModalProps> = props => {
title={t('requestingCredential')}
progress
/>

<MessageOverlay
isVisible={controller.isDownloadCancelled}
title={t('confirmationDialog.title')}
message={t('confirmationDialog.message')}
customHeight={250}>
<Column>
<Button
type="gradient"
title={t('confirmationDialog.wait')}
onPress={controller.WAIT}
margin={[0, 0, 8, 0]}
/>
<Button
type="clear"
title={t('confirmationDialog.cancel')}
onPress={controller.CANCEL}
/>
</Column>
</MessageOverlay>
</React.Fragment>
);
};
35 changes: 27 additions & 8 deletions screens/Home/MyVcs/OtpVerificationModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useEffect, useState} from 'react';
import {useTranslation} from 'react-i18next';
import {PinInput} from '../../../components/PinInput';
import {Column, Text} from '../../../components/ui';
import {Button, Column, Text} from '../../../components/ui';
import {ModalProps, Modal} from '../../../components/ui/Modal';
import {Theme} from '../../../components/ui/styleUtils';
import {Image, TouchableOpacity} from 'react-native';
@@ -12,6 +12,11 @@ import {
resetRetryCount,
sendImpressionEvent,
} from '../../../shared/telemetry/TelemetryUtils';
import {MessageOverlay} from '../../../components/MessageOverlay';
import {
OtpVerificationModalProps,
useOtpVerificationModal,
} from './OtpVerificationModalController';

export const OtpVerificationModal: React.FC<
OtpVerificationModalProps
@@ -20,6 +25,8 @@ export const OtpVerificationModal: React.FC<

const [timer, setTimer] = useState(180); // 30 seconds

const controller = useOtpVerificationModal(props);

useEffect(() => {
sendImpressionEvent(
getImpressionEventData(
@@ -124,13 +131,25 @@ export const OtpVerificationModal: React.FC<
</TouchableOpacity>
</Column>
</Column>
<MessageOverlay
isVisible={controller.isDownloadCancelled}
title={t('confirmationDialog.title')}
message={t('confirmationDialog.message')}
customHeight={250}>
<Column>
<Button
type="gradient"
title={t('confirmationDialog.wait')}
onPress={controller.WAIT}
margin={[0, 0, 8, 0]}
/>
<Button
type="clear"
title={t('confirmationDialog.cancel')}
onPress={controller.CANCEL}
/>
</Column>
</MessageOverlay>
</Modal>
);
};

interface OtpVerificationModalProps extends ModalProps {
onInputDone: (otp: string) => void;
error?: string;
resend?: () => void;
flow: string;
}
26 changes: 26 additions & 0 deletions screens/Home/MyVcs/OtpVerificationModalController.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
AddVcModalEvents,
AddVcModalMachine,
selectIsCancellingDownload,
} from './AddVcModalMachine';
import {ActorRefFrom} from 'xstate';
import {ModalProps} from '../../../components/ui/Modal';
import {useSelector} from '@xstate/react';

export function useOtpVerificationModal({service}: OtpVerificationModalProps) {
return {
isDownloadCancelled: useSelector(service, selectIsCancellingDownload),

WAIT: () => service.send(AddVcModalEvents.WAIT()),

CANCEL: () => service.send(AddVcModalEvents.CANCEL()),
};
}

export interface OtpVerificationModalProps extends ModalProps {
service: ActorRefFrom<typeof AddVcModalMachine>;
onInputDone: (otp: string) => void;
error?: string;
resend?: () => void;
flow: string;
}