-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat(INJI-474): show popup for invalid QR #999
Conversation
adityankannan-tw
commented
Nov 9, 2023
- at times a scanned QR code is neither online nor offline
we'll remove some |
@@ -723,6 +732,9 @@ export const scanMachine = | |||
}, | |||
{ | |||
actions: { | |||
offlineaccepted: () => console.log('>> offline QR accepted'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to log the QR acceptance or rejection , which would be seen in the UI itself, and moreover this log is more generic. if not needed, we can remove these 3 actions.
screens/Scan/ScanLayoutController.ts
Outdated
@@ -209,6 +209,7 @@ export function useScanLayout() { | |||
const isQrLoginDone = useSelector(scanService, selectIsQrLoginDone); | |||
|
|||
useEffect(() => { | |||
console.log('>> reviewing: ', isReviewing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the log here.
screens/Scan/ScanScreen.tsx
Outdated
); | ||
} | ||
|
||
function invalidQR(): React.ReactNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functional component name usually starts with Capital Letter. can we refactor this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name change suggestion -> displayInvalidQR
screens/Scan/ScanScreen.tsx
Outdated
title={t('common.errors.genericError')} | ||
// TODO: maybe add a message QR invalid | ||
onButtonPress={() => navigation.navigate(BOTTOM_TAB_ROUTES.scan)} | ||
buttonText={t('common:tryAgain')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think literals are tailed with . not :
this buttonText={t('common:tryAgain')} should be like buttonText={t('common.tryAgain')}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on our conversations, this seems to be okay, let me know if further action is required on this
linkCode.searchParams.get('linkCode') && | ||
linkCode.searchParams.get('linkExpireDateTime') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that we are fixing it @swatigoel, what more validation should be added here? should the clientAppCurrentTime be compared against the server time in a TZ aware fashion to check if the QR is valid?
screens/Scan/ScanScreen.tsx
Outdated
); | ||
} | ||
|
||
function invalidQR(): React.ReactNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name change suggestion -> displayInvalidQR
404c478
to
9d673eb
Compare
[Update] I've changed the |
); | ||
return linkCode !== null; | ||
let linkCode = new URL(event.params); | ||
// sample: 'inji://landing-page-name?linkCode=sTjp0XVH3t3dGCU&linkExpireDateTime=2023-11-09T06:56:18.482Z' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sample is mentioned in line 1176 as well, we can remove this. and log message on catch can be like "Exception Occurred while ****** "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vijay151096 That's a sample for the OpenIDqrCode i.e. offline QR code.
9d673eb
to
09a0398
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
screens/Scan/ScanScreen.tsx
Outdated
import {QrScanner} from '../../components/QrScanner'; | ||
import {Button, Centered, Column, Text} from '../../components/ui'; | ||
import {Button, Centered, Column, Row, Text} from '../../components/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Row is not getting used. We can remove it.
screens/Scan/ScanScreen.tsx
Outdated
/> | ||
) | ||
); | ||
} | ||
|
||
function displayInvalidQR(): React.ReactNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this method name? This looks like we are displaying invalid QR
cc: Sreenadh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it to displayInvalidQRpopup
* at times a scanned QR code is neither online nor offline Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
84c2313
to
a9a0049
Compare
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
a9a0049
to
a0aa028
Compare
Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
@vijay151096 This PR can be merged now --> #999 |
* feat(INJI-474): show popup for invalid QR * at times a scanned QR code is neither online nor offline Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): add a dismiss-able popup w buttons Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): use polyfill for URL searchParams feat Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): move popup buttons to a single row Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): align buttons in popup Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): don't show Loader on invalidQR & fix QR type logic Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): propagate btn style changes to Themes Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> --------- Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
* feat(INJI-474): show popup for invalid QR * at times a scanned QR code is neither online nor offline Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): add a dismiss-able popup w buttons Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): use polyfill for URL searchParams feat Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): move popup buttons to a single row Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): align buttons in popup Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): don't show Loader on invalidQR & fix QR type logic Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): propagate btn style changes to Themes Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> --------- Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com>
* feat(INJI-474): show popup for invalid QR (#999) * feat(INJI-474): show popup for invalid QR * at times a scanned QR code is neither online nor offline Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): add a dismiss-able popup w buttons Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): use polyfill for URL searchParams feat Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): move popup buttons to a single row Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): align buttons in popup Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): don't show Loader on invalidQR & fix QR type logic Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): propagate btn style changes to Themes Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> --------- Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> * Fix: (Inji-261): Most of the elements which are still in orange in the purple theme are fixed. (#1021) * Feat(INJI-261): Some elements still appearing orange colour in the purple theme Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * FIX(INJI-261): Some elements still appearing orange colour in the purple theme Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * FIX(INJI-261): Fixed the home screen icons to purple theme Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * FIX(INJI-261): Fixed the comments of respective PR Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * FIX(INJI-261): Fixed the comments of respective PR Signed-off-by: anil_majji <majjianilkumar050@gmail.com> --------- Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * MOSIP-30340 | Regression test for IOS added (#1023) * Test script updated for new apk Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added from master sheet Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * Test cases added from regression sheet Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * automated ios tests for regression Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * conflict resolved Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> --------- Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * Credential Registry testcases, help page new test cases added , MOSIP-30054 MOSIP-30230 MOSIP-30282 (#1024) * MOSIP-30054 MOSIP-30230 MOSIP-30282 Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflicts Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflict Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflict Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflict Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflict Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflict Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> --------- Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * fix(INJI-536):check status failed while downloading vc (#1032) Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * refactor(INJI-449): replace crypto-js with node-forge for encryption/decryption (#1034) * refactor(INJI-449): replace crypo-js with node-forge crypto-js has vulneraribitiles prior to version 4.2.0 for encryption / decryption & 4.x.x version is not compatible with our react native project For this reason we had to move to different library for encryption / decryption Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * fix(INJI-449): secure-keystore warning popup shown on reload of app settings key which was stored in storage was not loaded into settings machine context correctly, which caused the bug - on reload settings related flows was falling back to initial setting. Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): gitignore automation test results Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): simplify usage of methods in node-forge Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> --------- Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> * refactor(INJI-449): fix OWASP vulnerabilities with dependencies (#1035) * refactor(INJI-449): remove unused dependencies Dependencies removed 1. expo-status-bar 2. @expo-google-fonts/poppins 3. react-native-simple-markdown 4. react-native-swipe-gestures DevDependencies removed 1. @react-native/metro-config (removed as we already have @expo/metro-config dependency used) 2. metro-react-native-babel-preset 3. @types/react-test-renderer 4. react-test-renderer Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update expo related packages and crypto-js Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update transitive dependency of expo-updates package plist package is a transitive dependency of expo-updates which had vulnerability - Prototype pollution vulnerability via .parse() in Plist before v3.0.4 allows attackers to cause a Denial of Service (DoS) and may lead to remote code execution. Thus this package was updated to fix vulnerability Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update axios dependency of telemetry-sdk to 1.6.0 Since the package axios(1.5.0) has vulnerability - Cross-Site Request Forgery (CSRF), it is updated to 1.6.0 Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * fix(INJI-449): vulnerablity issue with @digitalbazaar/rsa-verification-key-2018 override the node-forge dependency of the package - @digitalbazaar/rsa-verification-key-2018 as it has the high severity with CVE count 13 Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * revert(INJI-449): downgrade crypto-js to 3.3.0 from 4.x.x version Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): use expo-splash-screen instead of expo-app-loading expo-app-loading package is deprecated and it is suggested to replace it with expo-splash-screen Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): optimize time taken to hide splash screen Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): change appEntry to index js Change appEntry to index.js file since react-native-url-polyfill/auto is imported to avoid URL error. appEntry is required for expo package update Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-559): update podfile.lock Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): optimize import Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> --------- Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * feat(INJI-541): for sonar qube generate dummy release keystore file in build.gradle Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> * fix(INJI-541): pass sonar args as input variable in internal build yml file Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> * fix(INJI-541): use dummy alias and password for dummyrelease keystore Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> * MOSIP-30369 | Framework structure change to support device farm execution (#1039) * Test script updated for new apk Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added from master sheet Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * Test cases added from regression sheet Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * new test cases added Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * automated ios tests for regression Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * conflict resolved Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * framework optimization Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * folder structure changed Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * framework restructure for device farm Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * incorporated review comments Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> --------- Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> * fix(INJI-541): comment sonarqube check Signed-off-by: adityankannan-tw <adityan410pm@gmail.com> * fix(INJI-541): use correct env variable name for slack webhook url Signed-off-by: adityankannan-tw <adityan410pm@gmail.com> --------- Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> Signed-off-by: anil_majji <majjianilkumar050@gmail.com> Signed-off-by: kamalsingh <kamal.singh@thoughtworks.com> Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> Signed-off-by: adityankannan-tw <adityan410pm@gmail.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Co-authored-by: kamalsinghthoughtworks <120381388+kamalsinghthoughtworks@users.noreply.github.com> Co-authored-by: anup-nehe <117707464+anup-nehe@users.noreply.github.com> Co-authored-by: srikanth716 <97477121+srikanth716@users.noreply.github.com> Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> Co-authored-by: adityankannan-tw <adityan410pm@gmail.com>
* feat(INJI-474): show popup for invalid QR * at times a scanned QR code is neither online nor offline Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): add a dismiss-able popup w buttons Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): use polyfill for URL searchParams feat Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): move popup buttons to a single row Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): align buttons in popup Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-474): don't show Loader on invalidQR & fix QR type logic Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> * refactor(INJI-474): propagate btn style changes to Themes Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com> Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> --------- Signed-off-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Anil kumar M <106086523+Anil-kumar-Majji@users.noreply.github.com> Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com>