Skip to content

Commit

Permalink
[INJIMOB-878] : vc state machine refactoring (#1344)
Browse files Browse the repository at this point in the history
* [INJI-631] add share and share with selfie options into kebab menu

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] change share vc component service attribute type to existingMosipVcItemMachine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] change the kebab menu options name as per the wireframe

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] add missing otp screen confirmation dialog translations for kannada language

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] extract vcItemField name and value into two separate components for better usability

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] show mini card view of the loaded VC and change the styles as per the wireframe

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] do not show the activation status and kebab menu when sharing vc and while doing QR login

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] show mini card view usin shimmerPlaceholder component when card is in loading state

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] add svg images for wallet activated and unactivated icon

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-631] fix the postion of pin icon when there is no image displayed in VC

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] show help icon and meat ball menu in vc detailed view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] add styles for detailed view profile icon and it's container

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-721]: add help icon on top bar and remove setting button

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

* [INJIMOB-721]: move settings to bottom tab bar

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

* [INJIMOB-721]: add search bar ui for vc search

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

* [INJIMOB-721]: add search filter for the vc search

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

* [INJIMOB-721]: refactor filtered data to show message when vc not found

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

* [INJIMOB-631] redirect to the home screen when user gives confirmation to delete the vc from the detailed view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-721]: add search svg for search bar and also style it

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

* [INJIMOB-631] in existing vcitem machine close the kebab popup when an option is selected in kebab menu except for remove vc option

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] change the remove vc confirm popup as per the wireframe

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] add icons for the kebab menu options and show the number of cards available in home screen

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] remove tooltip in detailed view and show remove vc kebab menu option in red color

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] close the kebab menu when user clicks on cancel button in removal confirmation popup

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMON-631] show verification status for all the VCs in mini view and detailed view based on isVerified status

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631]: send vc data to scan machine while selecting share or share with selfie from meatball menu

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-721]: add styles to search bar

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

* [INJIMOB-721]: add text msg when field searched in the vc search bar is not found

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

* [INJIMOB-631]: implement sharing VC flow from mini card view

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-721]: refactor search bar component to show diff icon for vc search and issuers search

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

* [INJIMOB-721]: remove unused code

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

* [INJIMOB-631]: implement sharing VC with selfie flow from mini card view

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: handle face auth failure scenario in VC sharing with selfie

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: handle proper closing of kebab menu on VC share option click

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-721]: add styles to the search bar

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

* [INJIMOB-631]: handle navigation to history page from success vc share page

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-721]: add background colour for home screen

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

* [INJIMOB-631]: display proper label for QR login from meat ball menu

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: handle QR login flow for mini view card

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631] show count of cards available matching with search keyword

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] show activated icon for the sunbird cards in the mini view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] hide share with selfie and qr login options in kebab menu if profile image is not available

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631]: updating logic to call isFromOpenId4VCI from an instance of VCMetadata

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: update kebab menu list icons to outline with black color

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: close kebab popup on selecting sharing option for esignet VCs

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: clear connect for invalid identity and back button click face auth during share with selfie

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631] fix the logic of showing how many cards available in the ui

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] remove styles for kebab menu pin icon

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631]: updating logic to call isFromOpenId4VCI from an instance of VCMetadata

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: reset the flowType and selectedVC variable in scan machine on any disconnect or success share of VC

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631] in detail view show activation status popup everytime in the bottom

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] replace activated icon with svg image in detailed view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631]: remove unused files

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631] don't show activation details in detailed view if VC image is not available

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] show verification status as valid if credentials are available

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] adjust the size of the image, qr code, magnifier and logo in detialed view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] increase the width of the activate button in the detialed view

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] in detialed view increase the divider with and change it's styles to show it as per wireframe

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] in detialed view  move email and all the address fields to the bottom view for all type of VCs

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] filter the supported credentials of esignet wellknown config based on credential type of issuers config

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] show the horizontal line in detailed view only if email or one of the address fields available in vc

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] fix the spelling mistake of detailed view image styles

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] remove unused event in existing mosip vc item machine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] change the name of the enum used for sharing flow from flow type to vc share flow type

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] create a new enum type to use it for showing the activation status in vcitem container

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] use logical and operator to decide whether to show horizontal line or not in detailed view and remove unnecessary logs

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] add test id to the profile icon container and adjust the styles of pin icon

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] move invalid identity message overlay to verify identity overlay component

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] show credential registry in the bottom section of detial view if it's env variable is set to true

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] add testId to detailed view qr code view and change settings tab title to settings

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] make whole kebab menu option as pressable

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631]: hide kebab menu from the VC on SendVCScreen

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: reset SelectedVc and flow type in scan machine for every kind of disconnect

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: remove redundant check on qr login

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631]: fix the prop value passed to the face scanner

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-631] add email & address back to default fields and write a logic to remove bottom section fields from wellknown config supported fields

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] move detailed view bottom section fields list into vcUtils file

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] remove unused action selectIsVerifiable in existing vc item machine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] pass the controller functions directly to verifyIdentityOverlay when calling it

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] add todo comment in vcVerification file to handled vc verification pending status as part of another task

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-631] render kebab menu options using flat list and make necessary changes related to menu options

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-721]: refactor search Filter for normal otp flow VC

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

* [INJIMOB-721]: refactor search Filter for sunbird and esignet vc

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

* [INJIMOB-721]: refactor to add metadata to esignet and sunbird vc on download before saving

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

* [INJIMOB-721]: show no of cards when search data is updated

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

* [INJIMOB-631] add back history tab file

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* INJIMOB-778 (#122)

* [INJIMOB-778]: add new localistaion for set and confirm passcode screen

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

* [INJIMOB-778]: add authorization after the biometric unlock

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

* [INJIMOB-778]: add check for biometric and password for the toggle

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

* [INJIMOB-778]: add success toaster message when alternate unlock method is added

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

* [INJIMOB-778]: remove toaster when the app is reopened

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

* [INJIMOB-778]: add locales for succes toaster for biometric toggle

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

* [INJIMOB-778]: refactor to check for the toggle from settings

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

* [INJIMOB-778]: refactor function that handles biometric toggle

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

* [INJIMOB-778]: refactor toggle_biometric_unlock event

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

* [INJIMOB-778]: refactor banner notification to show success message

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

* [INJIMOB-778]: add testID for new components

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

---------

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

* Injimob 784 (#124)

* [INJIMOB-784] add face verification consent overlay

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add dismiss for backdrop press

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add pop up for qrlogin flow also

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-864] disable backup button when restoring and vice versa (#1279)

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-867] - remove all files including unsynced files and get latest file based on date (#1281)

Signed-off-by: Sreenadh S <32409698+sree96@users.noreply.github.com>

* [INJIMOB - 865,868] - Fix duplicate VC key for restored VC's and remove metadata if vc file not found (#1283)

* [INJIMOB-something] use incremental timestamp for restore and make unload take a flag start time

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-865,868] fix duplicate vckey value for restored vcs and remove vc metadata if file not found

Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-869] remove unused method in store.ts machine

Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-869] revert removing vc metadata if file not found

Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-865] fix tamper vc removal

When a VC is tampered, we get the tampered vc popup. Once we press okay button in the popup, we will be refreshing the vc machine's myVcs & recievedVcs context. Due to calling of parallel states, we were having issue with refreshing of myVcs. It is fixed by targeting to init state to refresh

Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-865] remove vc metadata when file is not found

Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-869] add code comments & fix minor code issues

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

---------

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
Co-authored-by: Harsh Vardhan <harsh59v@gmail.com>
Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-784] set context after getting the value from store

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] refactor the names and send isConsentGiven value properly to the scan machine event

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-784] store & fetch the face auth consent value with proper types

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* INJIMOB-604 VC Verification Failure Scenarios (#1228)

* [INJI-604]: Handle Verification VC Error Scenarios

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-604] remove the card from UI when verify credential is failed and show error overlay

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-604] remove unused actions in existingMosipVcItem and issuers machine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* INJIMOB-604 Replace Error message overlay with new error screen.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJI-611]: New Error screen implemented

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJI-604]: Transation added for Verification error messages.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJI-604] merge develop and resolve conflicts

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJI-604] remove unnecessary log in error screen

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-604] remove removeVcFromMyVcs action from verify vc failed event and fix typegen warnings

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* INJIMOB-604 : Removing logs and renaming functions

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-604]: Removing unused method.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [Inji-604]: Fixing the issue of recursive VC deletion during Go Back event in Verification Error screen.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [Inji-604]: Fixing bugs post conflict resolve.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [Inji-604]: Removing unused events and adding translations for Go Back button

* [Inji-604]: Removed angle brackets for Technical Error

* [Inji-604]: Added ToDo to handle backup

* [Inji-604]: Removing isVerified flag from the Existing VC Item Machine.

* [Inji-604] iOS crash fixed for Verification error Go Back Button

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [Inji-604]: Simplified condition for result in verify Credential call.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-784] add styles for the popup

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add locales changes in all languages

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] send consent data using event to qrlogin machine

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] refactor scan and qr  machines and remove logs

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add testID for icons and buttons

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add translations for help screen contents

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] add translations for help screen contents

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* [INJIMOB-784] change popup text and alter help screen msg order

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

* Update SendVcScreenController.ts

* [INJIMOB-784] refactor actions for show face auth consent screen

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>

---------

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
Signed-off-by: Sreenadh S <32409698+sree96@users.noreply.github.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
Signed-off-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Co-authored-by: adityankannan-tw <adityan410pm@gmail.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: Harsh Vardhan <harsh59v@gmail.com>
Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Co-authored-by: balachandarg-tw <115633327+balachandarg-tw@users.noreply.github.com>

* [INJIMOB-878]: VC State Machine Refactoring

Signed-off-by: Vijay <94220135+vijay151096@users.noreply.github.com>

* [INJIMOB-878]: removed unused component from the codebase

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: remove any traces of existing and esignet item state machine from the code base

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: extract out phone number and email id to a wrapper object

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: optimize context variable declaration and usage in vc and vcItemStateMachine

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: move all the selectors to VCItemMachine from a seperate file

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: bring back code lost in code merge from develop

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: remove unused imports and refactor the openId4VCI check from entire code base to a single point

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: remove the entire vc or context sharing from the state machine to the component

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: refactor controller to remove seperate declaration of variables

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: extract events of VCItemMAchine into a seperate file

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: removed some unused imports renamed VCItemSelectors file and refactored KebabPopUpController

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: add issuer in OTP flow VC data as well

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: remove VP implemetation and some unused components

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: split VCItemMachine into multiple logical units

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: correct a test id for activation flow

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: fix issues dueto merge conflict

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-878]: changed the folder structure for VCItemMAchine and related files

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

---------

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: Alka <prasadalka1998@gmail.com>
Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>
Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>
Signed-off-by: Alka Prasad <Alka1703@users.noreply.github.com>
Signed-off-by: PoojaBabusing <115976560+PoojaBabusing@users.noreply.github.com>
Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
Signed-off-by: Sreenadh S <32409698+sree96@users.noreply.github.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
Signed-off-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Signed-off-by: Vijay <94220135+vijay151096@users.noreply.github.com>
Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Co-authored-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>
Co-authored-by: PoojaBabusing <115976560+PoojaBabusing@users.noreply.github.com>
Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Co-authored-by: adityankannan-tw <adityan410pm@gmail.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: Harsh Vardhan <harsh59v@gmail.com>
Co-authored-by: balachandarg-tw <115633327+balachandarg-tw@users.noreply.github.com>
Co-authored-by: Vijay <94220135+vijay151096@users.noreply.github.com>
  • Loading branch information
11 people authored Apr 1, 2024
1 parent 1e75dc8 commit 2cfd99d
Show file tree
Hide file tree
Showing 96 changed files with 2,433 additions and 4,563 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# eg . npm build android:newlogic --reset-cache

#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
MIMOTO_HOST=https://api.qa-inji1.mosip.net
MIMOTO_HOST=https://api.qa-inji.mosip.net

ESIGNET_HOST=https://api.qa-inji1.mosip.net
ESIGNET_HOST=https://api.qa-inji.mosip.net

OBSRV_HOST = https://dataset-api.obsrv.mosip.net

Expand Down
22 changes: 12 additions & 10 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ fileignoreconfig:
checksum: 6d22bc5c77398316b943c512c208ce0846a9fff674c1ccac79e07f21962acd5f
- filename: shared/telemetry/TelemetryConstants.js
checksum: fd8dc3a69cdef68855dc5f0531d8e634bfa2621bb4dc22f85b8247512a349c4c
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.ts
checksum: cca7657da3a1a91b63e0a10605545d1e0d3d152b083a55f9dbb9eed893646e4b
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.ts
checksum: 1d06c737c0a59cdda6604eb2a6f384bcaf361a682c19f43ef9e8537e38c53db4
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.typegen.ts
checksum: 0de47337ba60b29c8e4d4231439c77028197d3d8d3139eb367c471138c40f93d
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.typegen.ts
checksum: 86ecb95b58456d42676247eb768a7fba980a3c0ef83d515f8b9ce0c44d8c6906
- filename: shared/telemetry/TelemetryUtils.js
checksum: a0686e9a5c006176fd720b84bc36ca947db1422caf65c90cd0c2d1102a9e96df
- filename: ios/fastlane/Fastfile
Expand Down Expand Up @@ -115,8 +107,6 @@ fileignoreconfig:
checksum: ac9c154060c7c1adb3392ac8c78a42cae5ca3faea3b4b0166dd00d4ca38b290d
- filename: machines/settings.typegen.ts
checksum: e4ae05822f1b1c23f3f70d03dd46fd8f29ba6b52d40f2f24c121f536fbb5f2c4
- filename: .env
checksum: 387e1fbafb92f58b152b751ec97e8e0e31a699c43e273c61bdedb67f8ee7e453
- filename: .github/workflows/ui-automation.yml
checksum: 0b26a5dcb7524ba15d6aaeaf04f2ef94be9d25ef702d9072d6628bcd58e50f36
- filename: injitest/src/test/java/androidTestCases/PinVcTest.java
Expand Down Expand Up @@ -211,5 +201,17 @@ fileignoreconfig:
checksum: 1a15e4327b358ffee8bddfe412a38873ad6d4414d2b1d6bffd3c1782f5ec852f
- filename: screens/Home/IntroSlidersScreen.tsx
checksum: 9880724461b194db7651737576ad2fd2db9cf3b4e732747f59be422a7ff4e4a1
- filename: .env
checksum: 9386b7d2d9bba27d8f15e6cb482451dc45b785b4caa31bc29718ef16967e6ed1
- filename: machines/VCItemMachine/VCItemMachine.typegen.ts
checksum: 850b5d02636bef9e286fc0fbc4ffffbd38068f332c319302a906496f4bc1c8a1
- filename: machines/VCItemMachine/VCItemEvents.ts
checksum: 04e5758d4fa8bc37e8b66f7f51627a9e71ccbca7a046aa64e914f5cf855aa48b
- filename: machines/VCItemMachine/VCItemGaurds.ts
checksum: 4f32814fc26a0edaa54a42dbc9f9e1d899144eb059ac8da211d1738887871829
- filename: machines/VCItemMachine/VCItemServices.ts
checksum: 51b4872a64abd76b124000358068c0b213d50fb131d735c122cd9a177cd8390c
- filename: machines/VCItemMachine/VCItemActions.ts
checksum: cda2ec61f0b884e537d05d018330d7b3c6febbf10ad4cd8cd87c715e6ad1dcf4
version: ""

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Inji Mobile Wallet is a mobile application specifically created to streamline all types of identification and credentials into one digital wallet.
It offers a secure, trustworthy, and dependable mobile Verifiable Credentials wallet designed to fulfil the following functions

- Download and store Verifiable Credentials
- Conduct offline face authentication
- Share Verifiable Credentials
- Enable users to log in to online portals
- Share Verifiable Credentials
- Enable users to log in to online portals

for more details refer [here](https://docs.mosip.io/inji)

Expand Down
4 changes: 2 additions & 2 deletions components/KebabPopUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {Column, Row, Text} from '../components/ui';
import {View} from 'react-native';
import {useKebabPopUp} from './KebabPopUpController';
import {ActorRefFrom} from 'xstate';
import {ExistingMosipVCItemMachine} from '../machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine';
import {useTranslation} from 'react-i18next';
import {FlatList} from 'react-native-gesture-handler';
import {VCMetadata} from '../shared/VCMetadata';
import testIDProps from '../shared/commonUtil';
import {getKebabMenuOptions} from './kebabMenuUtils';
import {VCItemMachine} from '../machines/VerifiableCredential/VCItemMachine/VCItemMachine';

export const KebabPopUp: React.FC<KebabPopUpProps> = props => {
const controller = useKebabPopUp(props);
Expand Down Expand Up @@ -83,7 +83,7 @@ export interface KebabPopUpProps {
vcMetadata: VCMetadata;
isVisible?: boolean;
onDismiss: () => void;
service: ActorRefFrom<typeof ExistingMosipVCItemMachine>;
service: ActorRefFrom<typeof VCItemMachine>;
iconColor?: any;
icon?: any;
vcHasImage: boolean;
Expand Down
152 changes: 52 additions & 100 deletions components/KebabPopUpController.tsx
Original file line number Diff line number Diff line change
@@ -1,134 +1,86 @@
import {useSelector} from '@xstate/react';
import {ActorRefFrom} from 'xstate';
import {
selectAcceptingBindingOtp,
selectBindingAuthFailedError,
selectEmptyWalletBindingId,
selectBindingWarning,
selectIsCommunicationDetails,
selectIsPinned,
selectKebabPopUp,
selectAcceptingBindingOtp,
selectBindingWarning,
selectWalletBindingInProgress,
selectOtpError,
selectRemoveWalletWarning,
selectShowActivities,
selectWalletBindingResponse,
selectShowWalletBindingError,
selectWalletBindingError,
selectIsPhoneNumber,
selectIsEmail,
} from '../machines/VCItemMachine/commonSelectors';
import {
ExistingMosipVCItemEvents,
ExistingMosipVCItemMachine,
} from '../machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine';
import {
EsignetMosipVCItemEvents,
EsignetMosipVCItemMachine,
} from '../machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine';
selectWalletBindingInProgress,
} from '../machines/VerifiableCredential/VCItemMachine/VCItemSelectors';
import {selectActivities} from '../machines/activityLog';
import {GlobalContext} from '../shared/GlobalContext';
import {useContext, useState} from 'react';
import {useContext} from 'react';
import {VCMetadata} from '../shared/VCMetadata';
import {ScanEvents} from '../machines/bleShare/scan/scanMachine';
import {
BOTTOM_TAB_ROUTES,
SCAN_ROUTES,
ScanStackParamList,
} from '../routes/routesConstants';
import {BOTTOM_TAB_ROUTES, ScanStackParamList} from '../routes/routesConstants';
import {NavigationProp, useNavigation} from '@react-navigation/native';
import {MainBottomTabParamList} from '../routes/main';
import {selectIsScanning} from '../machines/bleShare/scan/selectors';
import {
VCItemEvents,
VCItemMachine,
} from '../machines/VerifiableCredential/VCItemMachine/VCItemMachine';
import {selectError} from '../machines/biometrics';

type ScanLayoutNavigation = NavigationProp<
ScanStackParamList & MainBottomTabParamList
>;

export function useKebabPopUp(props) {
const service = props.service as
| ActorRefFrom<typeof ExistingMosipVCItemMachine>
| ActorRefFrom<typeof EsignetMosipVCItemMachine>;
const service = props.service as ActorRefFrom<typeof VCItemMachine>;
const navigation = useNavigation<ScanLayoutNavigation>();
const vcEvents =
props.vcKey !== undefined && props.vcMetadata.isFromOpenId4VCI()
? EsignetMosipVCItemEvents
: ExistingMosipVCItemEvents;
const PIN_CARD = () => service.send(vcEvents.PIN_CARD());
const KEBAB_POPUP = () => service.send(vcEvents.KEBAB_POPUP());
const ADD_WALLET_BINDING_ID = () =>
service.send(vcEvents.ADD_WALLET_BINDING_ID());
const CONFIRM = () => service.send(vcEvents.CONFIRM());
const REMOVE = (vcMetadata: VCMetadata) =>
service.send(vcEvents.REMOVE(vcMetadata));
const DISMISS = () => service.send(vcEvents.DISMISS());
const CANCEL = () => service.send(vcEvents.CANCEL());
const SHOW_ACTIVITY = () => service.send(vcEvents.SHOW_ACTIVITY());
const INPUT_OTP = (otp: string) => service.send(vcEvents.INPUT_OTP(otp));
const RESEND_OTP = () => service.send(vcEvents.RESEND_OTP());
const isPinned = useSelector(service, selectIsPinned);
const isBindingWarning = useSelector(service, selectBindingWarning);
const isRemoveWalletWarning = useSelector(service, selectRemoveWalletWarning);
const isAcceptingOtpInput = useSelector(service, selectAcceptingBindingOtp);
const isWalletBindingError = useSelector(
service,
selectShowWalletBindingError,
);
const otpError = useSelector(service, selectOtpError);
const walletBindingError = useSelector(service, selectWalletBindingError);
const bindingAuthFailedError = useSelector(
service,
selectBindingAuthFailedError,
);
const WalletBindingInProgress = useSelector(
service,
selectWalletBindingInProgress,
);
const emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId);
const isKebabPopUp = useSelector(service, selectKebabPopUp);
const isShowActivities = useSelector(service, selectShowActivities);
const phoneNumber = useSelector(service, selectIsPhoneNumber);
const email = useSelector(service, selectIsEmail);
const {appService} = useContext(GlobalContext);
const activityLogService = appService.children.get('activityLog');
const scanService = appService.children.get('scan');
const isScanning = useSelector(scanService, selectIsScanning);

const GOTO_SCANSCREEN = () => {
navigation.navigate(BOTTOM_TAB_ROUTES.share);
};
const activityLogService = appService.children.get('activityLog')!!;
const scanService = appService.children.get('scan')!!;

return {
isPinned,
PIN_CARD,
KEBAB_POPUP,
ADD_WALLET_BINDING_ID,
CONFIRM,
GOTO_SCANSCREEN,
DISMISS,
REMOVE,
CANCEL,
INPUT_OTP,
RESEND_OTP,
SHOW_ACTIVITY,
service: props.service as ActorRefFrom<typeof VCItemMachine>,
navigation: useNavigation<ScanLayoutNavigation>(),
isScanning: useSelector(scanService, selectIsScanning),
activities: useSelector(activityLogService, selectActivities),
isPinned: useSelector(service, selectIsPinned),
isBindingWarning: useSelector(service, selectBindingWarning),
isRemoveWalletWarning: useSelector(service, selectRemoveWalletWarning),
isAcceptingOtpInput: useSelector(service, selectAcceptingBindingOtp),
isWalletBindingError: useSelector(service, selectShowWalletBindingError),
walletBindingResponse: useSelector(service, selectWalletBindingResponse),
otpError: useSelector(service, selectError),
walletBindingError: useSelector(service, selectError),
bindingAuthFailedError: useSelector(service, selectBindingAuthFailedError),
isKebabPopUp: useSelector(service, selectKebabPopUp),
isShowActivities: useSelector(service, selectShowActivities),
communicationDetails: useSelector(service, selectIsCommunicationDetails),
walletBindingInProgress: useSelector(
service,
selectWalletBindingInProgress,
),
PIN_CARD: () => service.send(VCItemEvents.PIN_CARD()),
KEBAB_POPUP: () => service.send(VCItemEvents.KEBAB_POPUP()),
ADD_WALLET_BINDING_ID: () =>
service.send(VCItemEvents.ADD_WALLET_BINDING_ID()),
CONFIRM: () => service.send(VCItemEvents.CONFIRM()),
REMOVE: (vcMetadata: VCMetadata) =>
service.send(VCItemEvents.REMOVE(vcMetadata)),
DISMISS: () => service.send(VCItemEvents.DISMISS()),
CANCEL: () => service.send(VCItemEvents.CANCEL()),
SHOW_ACTIVITY: () => service.send(VCItemEvents.SHOW_ACTIVITY()),
INPUT_OTP: (otp: string) => service.send(VCItemEvents.INPUT_OTP(otp)),
RESEND_OTP: () => service.send(VCItemEvents.RESEND_OTP()),
GOTO_SCANSCREEN: () => {
navigation.navigate(BOTTOM_TAB_ROUTES.share);
},
SELECT_VC_ITEM: (
vcRef: ActorRefFrom<typeof ExistingMosipVCItemMachine>,
vcRef: ActorRefFrom<typeof VCItemMachine>,
flowType: string,
) => {
const {serviceRefs, ...vcData} = vcRef.getSnapshot().context;
scanService.send(ScanEvents.SELECT_VC(vcData, flowType));
},
isScanning,
isBindingWarning,
isAcceptingOtpInput,
isWalletBindingError,
walletBindingError,
bindingAuthFailedError,
otpError,
WalletBindingInProgress,
emptyWalletBindingId,
isKebabPopUp,
isShowActivities,
isRemoveWalletWarning,
activities: useSelector(activityLogService, selectActivities),
phoneNumber,
email,
};
}
45 changes: 45 additions & 0 deletions components/VC/VCItemController.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import {useContext, useRef} from 'react';
import {GlobalContext} from '../../shared/GlobalContext';
import {
selectContext,
selectGeneratedOn,
selectKebabPopUp,
selectWalletBindingResponse,
selectCredential,
selectVerifiableCredentialData,
} from '../../machines/VerifiableCredential/VCItemMachine/VCItemSelectors';
import {useInterpret, useSelector} from '@xstate/react';
import {VCItemProps} from './Views/VCCardView';
import {
createVCItemMachine,
VCItemEvents,
} from '../../machines/VerifiableCredential/VCItemMachine/VCItemMachine';
import {selectIsSavingFailedInIdle} from '../../screens/Home/MyVcsTabMachine';

export function useVcItemController(props: VCItemProps) {
const {appService} = useContext(GlobalContext);
const machine = useRef(
createVCItemMachine(
appService.getSnapshot().context.serviceRefs,
props.vcMetadata,
),
);
const service = useInterpret(machine.current, {devTools: __DEV__});

return {
service,
context: useSelector(service, selectContext),
credential: useSelector(service, selectCredential),
verifiableCredentialData: useSelector(
service,
selectVerifiableCredentialData,
),
walletBindingResponse: useSelector(service, selectWalletBindingResponse),
isKebabPopUp: useSelector(service, selectKebabPopUp),
DISMISS: () => service.send(VCItemEvents.DISMISS()),
KEBAB_POPUP: () => service.send(VCItemEvents.KEBAB_POPUP()),
isSavingFailedInIdle: useSelector(service, selectIsSavingFailedInIdle),
storeErrorTranslationPath: 'errors.savingFailed',
generatedOn: useSelector(service, selectGeneratedOn),
};
}
10 changes: 2 additions & 8 deletions components/VC/VcDetailsContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import React from 'react';
import {
EsignetVCItemDetailsProps,
ExistingVCItemDetailsProps,
VCDetailView,
} from './Views/VCDetailView';
import {VCDetailView, VCItemDetailsProps} from './Views/VCDetailView';

export const VcDetailsContainer: React.FC<
ExistingVCItemDetailsProps | EsignetVCItemDetailsProps
> = props => {
export const VcDetailsContainer: React.FC<VCItemDetailsProps> = props => {
return <VCDetailView {...props} />;
};
10 changes: 2 additions & 8 deletions components/VC/VcItemContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import React from 'react';
import {
VCCardView,
EsignetVCItemProps,
ExistingVCItemProps,
} from './Views/VCCardView';
import {VCCardView, VCItemProps} from './Views/VCCardView';

export const VcItemContainer: React.FC<
ExistingVCItemProps | EsignetVCItemProps
> = props => {
export const VcItemContainer: React.FC<VCItemProps> = props => {
return <VCCardView {...props} />;
};
Loading

0 comments on commit 2cfd99d

Please sign in to comment.