mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
Mergerd with develop branch
This commit is contained in:
@@ -143,6 +143,14 @@ More info here:
|
||||
- [React Native - Publishing to the App Store](https://reactnative.dev/docs/publishing-to-app-store)
|
||||
- [Apple Developer - Distributing Your App for Beta Testing and Releases](https://developer.apple.com/documentation/xcode/distributing-your-app-for-beta-testing-and-releases)
|
||||
|
||||
## View the complete DB :
|
||||
|
||||
1. Connect your phone to the laptop and open Android Studio.
|
||||
2. On the bottom right vertical tab you will find a `Device File Explorer` button. Click on it and select you phone.
|
||||
3. Navigate to `data -> data -> io.mosip.residentapp ->databases`. You will find a file named `RKStorage` in it. Download it.
|
||||
4. Download [DB Browser for SQLite](https://sqlitebrowser.org/dl/) .
|
||||
5. Open the file in this application. Click on `Browse Data` button and select `catalystLocalStorage` table. Now you should be able to view the entire DB of Inji.
|
||||
|
||||
## Credits
|
||||
|
||||
Credits listed [here](/Credits.md)
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ActorRefFrom } from 'xstate';
|
||||
import { vcItemMachine } from '../machines/vcItem';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { HistoryTab } from '../screens/Home/MyVcs/HistoryTab';
|
||||
import { RemoveVcWarningOverlay } from '../screens/Home/MyVcs/RemoveVcWarningOverlay';
|
||||
|
||||
export const KebabPopUp: React.FC<KebabPopUpProps> = (props) => {
|
||||
const controller = useKebabPopUp(props);
|
||||
@@ -58,6 +59,24 @@ export const KebabPopUp: React.FC<KebabPopUpProps> = (props) => {
|
||||
label={t('ActivityLog')}
|
||||
vcKey={props.vcKey}
|
||||
/>
|
||||
|
||||
<ListItem bottomDivider>
|
||||
<ListItem.Content>
|
||||
<ListItem.Title>
|
||||
<Pressable onPress={() => controller.REMOVE(props.vcKey)}>
|
||||
<Text size="small" weight="bold">
|
||||
{t('Remove')}
|
||||
</Text>
|
||||
</Pressable>
|
||||
</ListItem.Title>
|
||||
</ListItem.Content>
|
||||
</ListItem>
|
||||
|
||||
<RemoveVcWarningOverlay
|
||||
isVisible={controller.isRemoveWalletWarning}
|
||||
onConfirm={controller.CONFIRM}
|
||||
onCancel={controller.CANCEL}
|
||||
/>
|
||||
</Column>
|
||||
</BottomSheet>
|
||||
</Column>
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
selectKebabPopUp,
|
||||
selectKebabPopUpAcceptingBindingOtp,
|
||||
selectKebabPopUpBindingWarning,
|
||||
selectRemoveWalletWarning,
|
||||
selectEmptyWalletBindingId,
|
||||
selectIsPinned,
|
||||
selectOtpError,
|
||||
@@ -25,12 +26,14 @@ export function useKebabPopUp(props) {
|
||||
const ADD_WALLET_BINDING_ID = () =>
|
||||
service.send(VcItemEvents.ADD_WALLET_BINDING_ID());
|
||||
const CONFIRM = () => service.send(VcItemEvents.CONFIRM());
|
||||
const REMOVE = (vcKey: string) => service.send(VcItemEvents.REMOVE(vcKey));
|
||||
const DISMISS = () => service.send(VcItemEvents.DISMISS());
|
||||
const CANCEL = () => service.send(VcItemEvents.CANCEL());
|
||||
const SHOW_ACTIVITY = () => service.send(VcItemEvents.SHOW_ACTIVITY());
|
||||
const INPUT_OTP = (otp: string) => service.send(VcItemEvents.INPUT_OTP(otp));
|
||||
const isPinned = useSelector(service, selectIsPinned);
|
||||
const isBindingWarning = useSelector(service, selectKebabPopUpBindingWarning);
|
||||
const isRemoveWalletWarning = useSelector(service, selectRemoveWalletWarning);
|
||||
const isAcceptingOtpInput = useSelector(
|
||||
service,
|
||||
selectKebabPopUpAcceptingBindingOtp
|
||||
@@ -58,6 +61,7 @@ export function useKebabPopUp(props) {
|
||||
ADD_WALLET_BINDING_ID,
|
||||
CONFIRM,
|
||||
DISMISS,
|
||||
REMOVE,
|
||||
CANCEL,
|
||||
INPUT_OTP,
|
||||
SHOW_ACTIVITY,
|
||||
@@ -70,6 +74,7 @@ export function useKebabPopUp(props) {
|
||||
emptyWalletBindingId,
|
||||
isKebabPopUp,
|
||||
isShowActivities,
|
||||
isRemoveWalletWarning,
|
||||
activities: useSelector(activityLogService, selectActivities),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { SUPPORTED_LANGUAGES } from '../i18n';
|
||||
import { I18nManager, View } from 'react-native';
|
||||
import { Picker } from './ui/Picker';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import Storage from '../shared/storage';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import i18next from 'i18next';
|
||||
import RNRestart from 'react-native-restart';
|
||||
@@ -16,7 +16,7 @@ export const LanguageSelector: React.FC<LanguageSelectorProps> = (props) => {
|
||||
const changeLanguage = async (language: string) => {
|
||||
if (language !== i18n.language) {
|
||||
await i18n.changeLanguage(language).then(async () => {
|
||||
await AsyncStorage.setItem('language', i18n.language);
|
||||
await Storage.setItem('language', i18n.language);
|
||||
const isRTL = i18next.dir(language) === 'rtl' ? true : false;
|
||||
if (isRTL !== I18nManager.isRTL) {
|
||||
try {
|
||||
|
||||
@@ -4,24 +4,15 @@ import * as DateFnsLocale from '../lib/date-fns/locale';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Image, ImageBackground, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { VC, CredentialSubject, LocalizedField } from '../types/vc';
|
||||
import { VC, CredentialSubject } from '../types/vc';
|
||||
import { Button, Column, Row, Text } from './ui';
|
||||
import { Theme } from './ui/styleUtils';
|
||||
import { TextItem } from './ui/TextItem';
|
||||
import { VcItemTags } from './VcItemTags';
|
||||
import VerifiedIcon from './VerifiedIcon';
|
||||
import { getLocalizedField } from '../i18n';
|
||||
import { QrCodeOverlay } from './QrCodeOverlay';
|
||||
|
||||
const VerifiedIcon: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
name="check-circle"
|
||||
color={Theme.Colors.VerifiedIcon}
|
||||
size={14}
|
||||
containerStyle={{ marginStart: 4, bottom: 1 }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const VcDetails: React.FC<VcDetailsProps> = (props) => {
|
||||
const { t, i18n } = useTranslation('VcDetails');
|
||||
|
||||
@@ -364,15 +355,3 @@ function getFullAddress(credential: CredentialSubject) {
|
||||
.filter(Boolean)
|
||||
.join(', ');
|
||||
}
|
||||
|
||||
function getLocalizedField(rawField: string | LocalizedField[]) {
|
||||
if (typeof rawField === 'string') {
|
||||
return rawField;
|
||||
}
|
||||
try {
|
||||
const locales: LocalizedField[] = JSON.parse(JSON.stringify(rawField));
|
||||
return locales[0].value;
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@ import { Column, Row, Text } from './ui';
|
||||
import { Theme } from './ui/styleUtils';
|
||||
import { GlobalContext } from '../shared/GlobalContext';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { LocalizedField } from '../types/vc';
|
||||
import { VcItemTags } from './VcItemTags';
|
||||
import { KebabPopUp } from './KebabPopUp';
|
||||
import VerifiedIcon from './VerifiedIcon';
|
||||
import { getLocalizedField } from '../i18n';
|
||||
|
||||
const getDetails = (arg1, arg2, verifiableCredential) => {
|
||||
if (arg1 === 'Status') {
|
||||
@@ -295,15 +295,3 @@ interface VcItemProps {
|
||||
iconName?: string;
|
||||
iconType?: string;
|
||||
}
|
||||
|
||||
function getLocalizedField(rawField: string | LocalizedField) {
|
||||
if (typeof rawField === 'string') {
|
||||
return rawField;
|
||||
}
|
||||
try {
|
||||
const locales: LocalizedField[] = JSON.parse(JSON.stringify(rawField));
|
||||
return locales[0].value;
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Column, Row, Text } from './ui';
|
||||
import { Theme } from './ui/styleUtils';
|
||||
import { RotatingIcon } from './RotatingIcon';
|
||||
import { GlobalContext } from '../shared/GlobalContext';
|
||||
import { LocalizedField } from '../types/vc';
|
||||
import { getLocalizedField } from '../i18n';
|
||||
|
||||
export const VidItem: React.FC<VcItemProps> = (props) => {
|
||||
const { appService } = useContext(GlobalContext);
|
||||
@@ -105,15 +105,3 @@ interface VcItemProps {
|
||||
selected?: boolean;
|
||||
onPress?: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
|
||||
}
|
||||
|
||||
function getLocalizedField(rawField: string | LocalizedField) {
|
||||
if (typeof rawField === 'string') {
|
||||
return rawField;
|
||||
}
|
||||
try {
|
||||
const locales: LocalizedField[] = JSON.parse(JSON.stringify(rawField));
|
||||
return locales[0].value;
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
64
i18n.ts
64
i18n.ts
@@ -8,9 +8,13 @@ import ar from './locales/ara.json';
|
||||
import hi from './locales/hin.json';
|
||||
import kn from './locales/kan.json';
|
||||
import ta from './locales/tam.json';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import Storage from './shared/storage';
|
||||
|
||||
const resources = { en, fil, ar, hi, kn, ta };
|
||||
import { iso6393To1 } from 'iso-639-3';
|
||||
import { LocalizedField } from './types/vc';
|
||||
|
||||
const languageCodeMap = {};
|
||||
|
||||
export const SUPPORTED_LANGUAGES = {
|
||||
en: 'English',
|
||||
@@ -31,13 +35,10 @@ i18next
|
||||
supportedLngs: Object.keys(SUPPORTED_LANGUAGES),
|
||||
})
|
||||
.then(async () => {
|
||||
const language = await AsyncStorage.getItem('language');
|
||||
if (Object.keys(SUPPORTED_LANGUAGES).includes(i18next.language)) {
|
||||
if (language !== i18next.language) {
|
||||
i18next.changeLanguage(language);
|
||||
}
|
||||
} else {
|
||||
i18next.changeLanguage('en');
|
||||
const language = await Storage.getItem('language');
|
||||
if (language !== i18next.language) {
|
||||
i18next.changeLanguage(language);
|
||||
populateLanguageCodeMap();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -47,3 +48,50 @@ export function getLanguageCode(code: string) {
|
||||
const [language] = code.split('-');
|
||||
return language;
|
||||
}
|
||||
|
||||
export function getVCDetailsForCurrentLanguage(locales) {
|
||||
const currentLanguage = i18next.language;
|
||||
const vcDetailsForCurrentLanguage = locales.filter(
|
||||
(obj) => obj.language === languageCodeMap[currentLanguage]
|
||||
);
|
||||
return vcDetailsForCurrentLanguage[0]?.value
|
||||
? vcDetailsForCurrentLanguage[0].value
|
||||
: locales[0]?.value;
|
||||
}
|
||||
|
||||
// This method gets the value from iso-639-3 package, which contains key value pairs of three letter language codes[key] and two letter langugae code[value]. These values are according to iso standards.
|
||||
// The response received from the server is three letter language code and the value in the inji code base is two letter language code. Hence the conversion is done.
|
||||
function getThreeLetterLanguageCode(twoLetterLanguageCode) {
|
||||
return Object.keys(iso6393To1).find(
|
||||
(key) => iso6393To1[key] === twoLetterLanguageCode
|
||||
);
|
||||
}
|
||||
|
||||
function populateLanguageCodeMap() {
|
||||
const supportedLanguages = Object.keys(SUPPORTED_LANGUAGES);
|
||||
supportedLanguages.forEach((languageCode) => {
|
||||
let threeLetterLanguageCode = languageCode;
|
||||
|
||||
if (isTwoLetterLanguageCode(languageCode)) {
|
||||
threeLetterLanguageCode = getThreeLetterLanguageCode(languageCode);
|
||||
}
|
||||
languageCodeMap[languageCode] = threeLetterLanguageCode;
|
||||
});
|
||||
}
|
||||
|
||||
export function getLocalizedField(rawField: string | LocalizedField[]) {
|
||||
if (typeof rawField === 'string') {
|
||||
return rawField;
|
||||
}
|
||||
try {
|
||||
const locales: LocalizedField[] = JSON.parse(JSON.stringify(rawField));
|
||||
if (locales.length == 1) return locales[0]?.value;
|
||||
return getVCDetailsForCurrentLanguage(locales);
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function isTwoLetterLanguageCode(languageCode) {
|
||||
return languageCode.length == 2;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,10 @@ PODS:
|
||||
- GoogleUtilitiesLegacy (1.3.2):
|
||||
- GoogleSymbolUtilities (~> 1.1)
|
||||
- GzipSwift (5.1.1)
|
||||
- mosip-inji-face-sdk (0.1.7):
|
||||
- MMKV (1.2.13):
|
||||
- MMKVCore (~> 1.2.13)
|
||||
- MMKVCore (1.2.15)
|
||||
- mosip-inji-face-sdk (0.1.12):
|
||||
- React-Core
|
||||
- NearbyMessages (1.1.1):
|
||||
- GoogleInterchangeUtilities (~> 1.2)
|
||||
@@ -272,9 +275,12 @@ PODS:
|
||||
- React-jsi (= 0.64.4)
|
||||
- React-perflogger (= 0.64.4)
|
||||
- React-jsinspector (0.64.4)
|
||||
- react-native-mmkv-storage (0.8.0):
|
||||
- MMKV (= 1.2.13)
|
||||
- React-Core
|
||||
- react-native-netinfo (7.1.3):
|
||||
- React-Core
|
||||
- react-native-openid4vp-ble (0.3.9):
|
||||
- react-native-openid4vp-ble (0.3.11):
|
||||
- CrcSwift (~> 0.0.3)
|
||||
- GzipSwift
|
||||
- React-Core
|
||||
@@ -352,8 +358,6 @@ PODS:
|
||||
- React-perflogger (= 0.64.4)
|
||||
- RNBluetoothStateManager (1.3.4):
|
||||
- React-Core
|
||||
- RNCAsyncStorage (1.15.17):
|
||||
- React-Core
|
||||
- RNCPicker (2.2.1):
|
||||
- React-Core
|
||||
- RNDeviceInfo (8.7.1):
|
||||
@@ -427,6 +431,7 @@ DEPENDENCIES:
|
||||
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
|
||||
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
|
||||
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
||||
- react-native-mmkv-storage (from `../node_modules/react-native-mmkv-storage`)
|
||||
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
|
||||
- react-native-openid4vp-ble (from `../node_modules/react-native-openid4vp-ble`)
|
||||
- react-native-restart (from `../node_modules/react-native-restart`)
|
||||
@@ -446,7 +451,6 @@ DEPENDENCIES:
|
||||
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
|
||||
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
||||
- RNBluetoothStateManager (from `../node_modules/react-native-bluetooth-state-manager`)
|
||||
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
|
||||
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
|
||||
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
|
||||
- RNFS (from `../node_modules/react-native-fs`)
|
||||
@@ -469,6 +473,8 @@ SPEC REPOS:
|
||||
- GoogleSymbolUtilities
|
||||
- GoogleUtilitiesLegacy
|
||||
- GzipSwift
|
||||
- MMKV
|
||||
- MMKVCore
|
||||
- NearbyMessages
|
||||
- ZXingObjC
|
||||
|
||||
@@ -551,6 +557,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
|
||||
React-jsinspector:
|
||||
:path: "../node_modules/react-native/ReactCommon/jsinspector"
|
||||
react-native-mmkv-storage:
|
||||
:path: "../node_modules/react-native-mmkv-storage"
|
||||
react-native-netinfo:
|
||||
:path: "../node_modules/@react-native-community/netinfo"
|
||||
react-native-openid4vp-ble:
|
||||
@@ -589,8 +597,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/ReactCommon"
|
||||
RNBluetoothStateManager:
|
||||
:path: "../node_modules/react-native-bluetooth-state-manager"
|
||||
RNCAsyncStorage:
|
||||
:path: "../node_modules/@react-native-async-storage/async-storage"
|
||||
RNCPicker:
|
||||
:path: "../node_modules/@react-native-picker/picker"
|
||||
RNDeviceInfo:
|
||||
@@ -647,7 +653,9 @@ SPEC CHECKSUMS:
|
||||
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
|
||||
GoogleUtilitiesLegacy: 5501bedec1646bd284286eb5fc9453f7e23a12f4
|
||||
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
|
||||
mosip-inji-face-sdk: a1355473a393f2cdd6d927c51af4363be6d97d9f
|
||||
MMKV: aac95d817a100479445633f2b3ed8961b4ac5043
|
||||
MMKVCore: ddf41b9d9262f058419f9ba7598719af56c02cd3
|
||||
mosip-inji-face-sdk: d5bc0fb66721c25450f92d3297efcb2cf0117271
|
||||
NearbyMessages: bd9e88f2df7fbab78be58fed58580d5d5bd62cbf
|
||||
Permission-BluetoothPeripheral: 67708853584bb9208c76d36d0e0ea4eafb97ea5b
|
||||
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
|
||||
@@ -664,8 +672,9 @@ SPEC CHECKSUMS:
|
||||
React-jsi: 64f80675a66899bf0f4a58b8e3908966fa516234
|
||||
React-jsiexecutor: 8c077bef1c64430b6034f27df1000d194551e2eb
|
||||
React-jsinspector: d4f6973dd474357dbaaf6f52f31ffc713bf3e766
|
||||
react-native-mmkv-storage: 8ba3c0216a6df283ece11205b442a3e435aec4e5
|
||||
react-native-netinfo: 42c0965fca99069b92e3f7360ab2d425985e5104
|
||||
react-native-openid4vp-ble: ca0d953933922f55ba18027e2dec7d64d36e1dc3
|
||||
react-native-openid4vp-ble: 98e3371b181b695a44f446f55d7c25c63fe0aa5f
|
||||
react-native-restart: 45c8dca02491980f2958595333cbccd6877cb57e
|
||||
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
|
||||
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
|
||||
@@ -683,7 +692,6 @@ SPEC CHECKSUMS:
|
||||
React-runtimeexecutor: 5b441857030bb6c3abaa7517f333cb01875ae499
|
||||
ReactCommon: b4a65d2d6e9eeffd4b32dde1245962b3f43907d0
|
||||
RNBluetoothStateManager: ae6a26260cbdf1827b58bd3bcc563527d61e6488
|
||||
RNCAsyncStorage: 6bd5a7ba3dde1c3facba418aa273f449bdc5437a
|
||||
RNCPicker: cb57c823d5ce8d2d0b5dfb45ad97b737260dc59e
|
||||
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
|
||||
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
"yesConfirm": "Yes, I confirm",
|
||||
"no" : "No"
|
||||
},
|
||||
"RemoveVcWarningOverlay":{
|
||||
"alert": "Please Confirm",
|
||||
"BindingWarning": "Do you want to remove this card",
|
||||
"yesConfirm": "Yes, I confirm",
|
||||
"no" : "No"
|
||||
},
|
||||
"AuthScreen": {
|
||||
"header": "Select App Unlock Method",
|
||||
"Description": "Would you like to use biometrics to unlock the application?",
|
||||
@@ -180,12 +186,12 @@
|
||||
"OnboardingOverlay": {
|
||||
"stepOneTitle":"Protect Privacy",
|
||||
"stepOneText":"Lorem Ipsum is simply a standard text of the printing and typesetting industry",
|
||||
"stepTwoTitle": "Secure Sharing!",
|
||||
"stepTwoText": "Share and receive {{vcLabel}} switfly using your phone camera to scan QR codes",
|
||||
"stepTwoTitle": "Secure Sharing",
|
||||
"stepTwoText": "Share and receive ID switfly using your phone camera to scan QR codes",
|
||||
"stepThreeTitle": "Trusted Digital Wallet",
|
||||
"stepThreeText": "Keep your digital credential with you at all times",
|
||||
"stepFourTitle": "Quick Access",
|
||||
"stepFourText": "Once generated, {{vcLabel}} are safely stored on your mobile.",
|
||||
"stepFourText": "Once generated, ID's are safely stored on your mobile.",
|
||||
"stepFourButton": "Get Started",
|
||||
"skip": "Skip",
|
||||
"next": "Next"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Keychain from 'react-native-keychain';
|
||||
import CryptoJS from 'crypto-js';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import Storage from '../shared/storage';
|
||||
import binaryToBase64 from 'react-native/Libraries/Utilities/binaryToBase64';
|
||||
import { EventFrom, Receiver, sendParent, send, sendUpdate } from 'xstate';
|
||||
import { createModel } from 'xstate/lib/model';
|
||||
@@ -298,8 +298,8 @@ export async function setItem(
|
||||
) {
|
||||
try {
|
||||
const data = JSON.stringify(value);
|
||||
const encrypted = encryptJson(encryptionKey, data);
|
||||
await AsyncStorage.setItem(key, encrypted);
|
||||
const encryptedData = encryptJson(encryptionKey, data);
|
||||
await Storage.setItem(key, encryptedData);
|
||||
} catch (e) {
|
||||
console.error('error setItem:', e);
|
||||
throw e;
|
||||
@@ -312,11 +312,10 @@ export async function getItem(
|
||||
encryptionKey: string
|
||||
) {
|
||||
try {
|
||||
const data = await AsyncStorage.getItem(key);
|
||||
const data = await Storage.getItem(key);
|
||||
if (data != null) {
|
||||
const decrypted = decryptJson(encryptionKey, data);
|
||||
|
||||
return JSON.parse(decrypted);
|
||||
const decryptedData = decryptJson(encryptionKey, data);
|
||||
return JSON.parse(decryptedData);
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
@@ -386,9 +385,9 @@ export async function removeItem(
|
||||
encryptionKey: string
|
||||
) {
|
||||
try {
|
||||
const data = await AsyncStorage.getItem(key);
|
||||
const decrypted = decryptJson(encryptionKey, data);
|
||||
const list = JSON.parse(decrypted);
|
||||
const data = await Storage.getItem(key);
|
||||
const decryptedData = decryptJson(encryptionKey, data);
|
||||
const list = JSON.parse(decryptedData);
|
||||
const vcKeyArray = value.split(':');
|
||||
const finalVcKeyArray = vcKeyArray.pop();
|
||||
const finalVcKey = vcKeyArray.join(':');
|
||||
@@ -410,9 +409,9 @@ export async function removeItems(
|
||||
encryptionKey: string
|
||||
) {
|
||||
try {
|
||||
const data = await AsyncStorage.getItem(key);
|
||||
const decrypted = decryptJson(encryptionKey, data);
|
||||
const list = JSON.parse(decrypted);
|
||||
const data = await Storage.getItem(key);
|
||||
const decryptedData = decryptJson(encryptionKey, data);
|
||||
const list = JSON.parse(decryptedData);
|
||||
const newList = list.filter(function (vc: string) {
|
||||
return !values.find(function (vcKey: string) {
|
||||
const vcKeyArray = vcKey.split(':');
|
||||
@@ -432,20 +431,21 @@ export async function removeItems(
|
||||
|
||||
export async function clear() {
|
||||
try {
|
||||
await AsyncStorage.clear();
|
||||
console.log('entire storage gets cleared.');
|
||||
await Storage.clear();
|
||||
} catch (e) {
|
||||
console.error('error clear:', e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
export function encryptJson(encryptionKey: string, data: string): string {
|
||||
function encryptJson(encryptionKey: string, data: string): string {
|
||||
return CryptoJS.AES.encrypt(data, encryptionKey).toString();
|
||||
}
|
||||
|
||||
export function decryptJson(encryptionKey: string, encrypted: string): string {
|
||||
function decryptJson(encryptionKey: string, encryptedData: string): string {
|
||||
try {
|
||||
return CryptoJS.AES.decrypt(encrypted, encryptionKey).toString(
|
||||
return CryptoJS.AES.decrypt(encryptedData, encryptionKey).toString(
|
||||
CryptoJS.enc.Utf8
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
@@ -55,6 +55,11 @@ export const vcMachine =
|
||||
initial: 'init',
|
||||
states: {
|
||||
init: {
|
||||
on: {
|
||||
REFRESH_MY_VCS: {
|
||||
target: '#vc.ready.myVcs.refreshing',
|
||||
},
|
||||
},
|
||||
initial: 'myVcs',
|
||||
states: {
|
||||
myVcs: {
|
||||
@@ -273,14 +278,21 @@ export function selectIsRefreshingReceivedVcs(state: State) {
|
||||
return state.matches('ready.receivedVcs.refreshing');
|
||||
}
|
||||
|
||||
/*
|
||||
This Methods gets the Wallet's Distinct Binded VCs, which got recently added.
|
||||
*/
|
||||
export function selectBindedVcs(state: State) {
|
||||
return (Object.keys(state.context.vcs) as Array<string>).filter((key) => {
|
||||
var walletBindingResponse = state.context.vcs[key].walletBindingResponse;
|
||||
return (
|
||||
state.context.myVcs.includes(key) &&
|
||||
walletBindingResponse !== null &&
|
||||
walletBindingResponse.walletBindingId !== null &&
|
||||
walletBindingResponse.walletBindingId !== ''
|
||||
);
|
||||
const distinctBindedVcs = new Set();
|
||||
return (state.context.myVcs as Array<string>).filter((key) => {
|
||||
let walletBindingResponse = state.context.vcs[key].walletBindingResponse;
|
||||
let validVC =
|
||||
!isEmpty(walletBindingResponse) &&
|
||||
!isEmpty(walletBindingResponse?.walletBindingId) &&
|
||||
!distinctBindedVcs.has(walletBindingResponse.walletBindingId);
|
||||
distinctBindedVcs.add(walletBindingResponse?.walletBindingId);
|
||||
return validVC;
|
||||
});
|
||||
}
|
||||
function isEmpty(object) {
|
||||
return object == null || object == '' || object == undefined;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import getAllConfigurations, {
|
||||
DownloadProps,
|
||||
} from '../shared/commonprops/commonProps';
|
||||
import { VcEvents } from './vc';
|
||||
import i18n from '../i18n';
|
||||
|
||||
const model = createModel(
|
||||
{
|
||||
@@ -33,6 +34,8 @@ const model = createModel(
|
||||
id: '',
|
||||
idType: '' as VcIdType,
|
||||
tag: '',
|
||||
vcKey: '' as string,
|
||||
myVcs: [] as string[],
|
||||
generatedOn: null as Date,
|
||||
credential: null as DecodedCredential,
|
||||
verifiableCredential: null as VerifiableCredential,
|
||||
@@ -79,6 +82,7 @@ const model = createModel(
|
||||
PIN_CARD: () => ({}),
|
||||
KEBAB_POPUP: () => ({}),
|
||||
SHOW_ACTIVITY: () => ({}),
|
||||
REMOVE: (vcKey: string) => ({ vcKey }),
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -224,7 +228,6 @@ export const vcItemMachine =
|
||||
KEBAB_POPUP: {
|
||||
target: 'kebabPopUp',
|
||||
},
|
||||
|
||||
DISMISS: {
|
||||
target: 'checkingVc',
|
||||
},
|
||||
@@ -254,6 +257,10 @@ export const vcItemMachine =
|
||||
SHOW_ACTIVITY: {
|
||||
target: '#vc-item.kebabPopUp.showActivities',
|
||||
},
|
||||
REMOVE: {
|
||||
actions: 'setVcKey',
|
||||
target: '#vc-item.kebabPopUp.removeWallet',
|
||||
},
|
||||
},
|
||||
initial: 'idle',
|
||||
states: {
|
||||
@@ -361,6 +368,25 @@ export const vcItemMachine =
|
||||
DISMISS: '#vc-item.kebabPopUp',
|
||||
},
|
||||
},
|
||||
removeWallet: {
|
||||
on: {
|
||||
CONFIRM: {
|
||||
target: 'removingVc',
|
||||
},
|
||||
CANCEL: {
|
||||
target: 'idle',
|
||||
},
|
||||
},
|
||||
},
|
||||
removingVc: {
|
||||
entry: 'removeVcItem',
|
||||
on: {
|
||||
STORE_RESPONSE: {
|
||||
actions: ['removedVc', log('removing Vc')],
|
||||
target: '#vc-item',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
editingTag: {
|
||||
@@ -699,6 +725,15 @@ export const vcItemMachine =
|
||||
}
|
||||
),
|
||||
|
||||
removedVc: send(
|
||||
() => ({
|
||||
type: 'REFRESH_MY_VCS',
|
||||
}),
|
||||
{
|
||||
to: (context) => context.serviceRefs.vc,
|
||||
}
|
||||
),
|
||||
|
||||
requestVcContext: send(
|
||||
(context) => ({
|
||||
type: 'GET_VC_ITEM',
|
||||
@@ -848,6 +883,10 @@ export const vcItemMachine =
|
||||
otp: (_, event) => event.otp,
|
||||
}),
|
||||
|
||||
setVcKey: model.assign({
|
||||
vcKey: (_, event) => event.vcKey,
|
||||
}),
|
||||
|
||||
setOtpError: assign({
|
||||
otpError: (_context, event) =>
|
||||
(event as ErrorPlatformEvent).data.message,
|
||||
@@ -870,6 +909,17 @@ export const vcItemMachine =
|
||||
},
|
||||
{ to: (context) => context.serviceRefs.store }
|
||||
),
|
||||
|
||||
loadMyVcs: send(StoreEvents.GET(MY_VCS_STORE_KEY), {
|
||||
to: (context) => context.serviceRefs.store,
|
||||
}),
|
||||
|
||||
removeVcItem: send(
|
||||
(_context, event) => {
|
||||
return StoreEvents.REMOVE(MY_VCS_STORE_KEY, _context.vcKey);
|
||||
},
|
||||
{ to: (context) => context.serviceRefs.store }
|
||||
),
|
||||
},
|
||||
|
||||
services: {
|
||||
@@ -1257,6 +1307,10 @@ export function selectKebabPopUpBindingWarning(state: State) {
|
||||
return state.matches('kebabPopUp.showBindingWarning');
|
||||
}
|
||||
|
||||
export function selectRemoveWalletWarning(state: State) {
|
||||
return state.matches('kebabPopUp.removeWallet');
|
||||
}
|
||||
|
||||
export function selectShowActivities(state: State) {
|
||||
return state.matches('kebabPopUp.showActivities');
|
||||
}
|
||||
|
||||
@@ -199,6 +199,8 @@ export interface Typegen0 {
|
||||
| 'done.invoke.vc-item.kebabPopUp.updatingPrivateKey:invocation[0]'
|
||||
| 'done.invoke.vc-item.updatingPrivateKey:invocation[0]';
|
||||
markVcValid: 'done.invoke.vc-item.verifyingCredential:invocation[0]';
|
||||
removeVcItem: 'CONFIRM';
|
||||
removedVc: 'STORE_RESPONSE';
|
||||
requestStoredContext: 'GET_VC_RESPONSE' | 'REFRESH';
|
||||
requestVcContext: 'DISMISS' | 'xstate.init';
|
||||
revokeVID: 'done.invoke.vc-item.requestingRevoke:invocation[0]';
|
||||
@@ -229,6 +231,7 @@ export interface Typegen0 {
|
||||
| 'done.invoke.vc-item.requestingOtp:invocation[0]'
|
||||
| 'error.platform.vc-item.requestingLock:invocation[0]'
|
||||
| 'error.platform.vc-item.requestingRevoke:invocation[0]';
|
||||
setVcKey: 'REMOVE';
|
||||
setWalletBindingError:
|
||||
| 'error.platform.vc-item.addKeyPair:invocation[0]'
|
||||
| 'error.platform.vc-item.addingWalletBindingId:invocation[0]'
|
||||
@@ -311,6 +314,8 @@ export interface Typegen0 {
|
||||
| 'kebabPopUp.addKeyPair'
|
||||
| 'kebabPopUp.addingWalletBindingId'
|
||||
| 'kebabPopUp.idle'
|
||||
| 'kebabPopUp.removeWallet'
|
||||
| 'kebabPopUp.removingVc'
|
||||
| 'kebabPopUp.requestingBindingOtp'
|
||||
| 'kebabPopUp.showActivities'
|
||||
| 'kebabPopUp.showBindingWarning'
|
||||
@@ -340,6 +345,8 @@ export interface Typegen0 {
|
||||
| 'addKeyPair'
|
||||
| 'addingWalletBindingId'
|
||||
| 'idle'
|
||||
| 'removeWallet'
|
||||
| 'removingVc'
|
||||
| 'requestingBindingOtp'
|
||||
| 'showActivities'
|
||||
| 'showBindingWarning'
|
||||
|
||||
497
package-lock.json
generated
497
package-lock.json
generated
@@ -7,6 +7,7 @@
|
||||
"": {
|
||||
"name": "mosip-resident-app",
|
||||
"version": "1.0.0",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@digitalbazaar/ed25519-signature-2018": "digitalbazaar/ed25519-signature-2018",
|
||||
"@digitalbazaar/ed25519-verification-key-2018": "digitalbazaar/ed25519-verification-key-2018",
|
||||
@@ -17,7 +18,6 @@
|
||||
"@expo-google-fonts/poppins": "^0.2.0",
|
||||
"@expo/metro-config": "^0.3.12",
|
||||
"@idpass/smartshare-react-native": "0.2.3-beta.2",
|
||||
"@react-native-async-storage/async-storage": "~1.15.0",
|
||||
"@react-native-community/netinfo": "7.1.3",
|
||||
"@react-native-picker/picker": "2.2.1",
|
||||
"@react-navigation/bottom-tabs": "^6.0.7",
|
||||
@@ -40,8 +40,11 @@
|
||||
"expo-status-bar": "~1.2.0",
|
||||
"expo-updates": "~0.11.6",
|
||||
"i18next": "^21.6.16",
|
||||
"iso-639-3": "^3.0.1",
|
||||
"mosip-inji-face-sdk": "^0.1.12",
|
||||
"node-forge": "^1.3.1",
|
||||
"patch-package": "^6.5.1",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"react": "17.0.1",
|
||||
"react-i18next": "^11.16.6",
|
||||
"react-native": "0.64.4",
|
||||
@@ -58,7 +61,8 @@
|
||||
"react-native-keychain": "^8.0.0",
|
||||
"react-native-linear-gradient": "^2.6.2",
|
||||
"react-native-location-enabler": "^4.1.0",
|
||||
"react-native-openid4vp-ble": "github:mosip/tuvali#v0.3.10",
|
||||
"react-native-mmkv-storage": "0.8.0",
|
||||
"react-native-openid4vp-ble": "github:mosip/tuvali#v0.3.11",
|
||||
"react-native-permissions": "^3.6.0",
|
||||
"react-native-popable": "^0.4.3",
|
||||
"react-native-qrcode-svg": "^6.1.1",
|
||||
@@ -4231,17 +4235,6 @@
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
||||
},
|
||||
"node_modules/@react-native-async-storage/async-storage": {
|
||||
"version": "1.15.17",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.17.tgz",
|
||||
"integrity": "sha512-NQCFs47aFEch9kya/bqwdpvSdZaVRtzU7YB02L8VrmLSLpKgQH/1VwzFUBPcc1/JI1s3GU4yOLVrEbwxq+Fqcw==",
|
||||
"dependencies": {
|
||||
"merge-options": "^3.0.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react-native": "^0.0.0-0 || 0.60 - 0.67 || 1000.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native-community/cli": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-5.0.1.tgz",
|
||||
@@ -6107,6 +6100,11 @@
|
||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@yarnpkg/lockfile": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
|
||||
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
@@ -15069,7 +15067,6 @@
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"is-docker": "cli.js"
|
||||
},
|
||||
@@ -15241,14 +15238,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-obj": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
|
||||
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-object": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||
@@ -15571,7 +15560,6 @@
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0"
|
||||
},
|
||||
@@ -15589,6 +15577,15 @@
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"node_modules/iso-639-3": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/iso-639-3/-/iso-639-3-3.0.1.tgz",
|
||||
"integrity": "sha512-SdljCYXOexv/JmbQ0tvigHN43yECoscVpe2y2hlEqy/CStXQlroPhZLj7zKLRiGqLJfw8k7B973UAMDoQczVgQ==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/isobject": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
|
||||
@@ -16318,6 +16315,14 @@
|
||||
"graceful-fs": "^4.1.9"
|
||||
}
|
||||
},
|
||||
"node_modules/klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.11"
|
||||
}
|
||||
},
|
||||
"node_modules/kleur": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
@@ -17031,17 +17036,6 @@
|
||||
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/merge-options": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",
|
||||
"integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",
|
||||
"dependencies": {
|
||||
"is-plain-obj": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
@@ -19337,6 +19331,212 @@
|
||||
"which": "bin/which"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package": {
|
||||
"version": "6.5.1",
|
||||
"resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
|
||||
"integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
|
||||
"dependencies": {
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"chalk": "^4.1.2",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"find-yarn-workspace-root": "^2.0.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"is-ci": "^2.0.0",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"minimist": "^1.2.6",
|
||||
"open": "^7.4.2",
|
||||
"rimraf": "^2.6.3",
|
||||
"semver": "^5.6.0",
|
||||
"slash": "^2.0.0",
|
||||
"tmp": "^0.0.33",
|
||||
"yaml": "^1.10.2"
|
||||
},
|
||||
"bin": {
|
||||
"patch-package": "index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10",
|
||||
"npm": ">5"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/patch-package/node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dependencies": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/rimraf": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
||||
"dependencies": {
|
||||
"glob": "^7.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"rimraf": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
|
||||
"dependencies": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"which": "bin/which"
|
||||
}
|
||||
},
|
||||
"node_modules/path-browserify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
||||
@@ -20325,6 +20525,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/postinstall-postinstall": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz",
|
||||
"integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==",
|
||||
"hasInstallScript": true
|
||||
},
|
||||
"node_modules/prelude-ls": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||
@@ -21440,9 +21646,20 @@
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-mmkv-storage": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-mmkv-storage/-/react-native-mmkv-storage-0.8.0.tgz",
|
||||
"integrity": "sha512-L782Le5IuDYlDLGXF/qimbnzvkbYsSmV5PiDleo1DSS8Kr8Q31UK8YWtUICrDGQ9Fm7Xx4PxP9ffe2XzGeWaHQ==",
|
||||
"bin": {
|
||||
"mmkv-link": "autolink/postlink/run.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-openid4vp-ble": {
|
||||
"version": "0.3.10",
|
||||
"resolved": "git+ssh://git@github.com/mosip/tuvali.git#93eb32c3f5a3a844569e60613491a8b81ca8fef8",
|
||||
"version": "0.3.11",
|
||||
"resolved": "git+ssh://git@github.com/mosip/tuvali.git#cf22b7869cefda9cbd3908b73b980ae459503338",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
@@ -24868,7 +25085,6 @@
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"os-tmpdir": "~1.0.2"
|
||||
},
|
||||
@@ -28260,7 +28476,6 @@
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
@@ -31453,14 +31668,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@react-native-async-storage/async-storage": {
|
||||
"version": "1.15.17",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.17.tgz",
|
||||
"integrity": "sha512-NQCFs47aFEch9kya/bqwdpvSdZaVRtzU7YB02L8VrmLSLpKgQH/1VwzFUBPcc1/JI1s3GU4yOLVrEbwxq+Fqcw==",
|
||||
"requires": {
|
||||
"merge-options": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"@react-native-community/cli": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-5.0.1.tgz",
|
||||
@@ -32950,6 +33157,11 @@
|
||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@yarnpkg/lockfile": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
|
||||
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
@@ -40083,8 +40295,7 @@
|
||||
"is-docker": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="
|
||||
},
|
||||
"is-extendable": {
|
||||
"version": "1.0.1",
|
||||
@@ -40197,11 +40408,6 @@
|
||||
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-plain-obj": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
|
||||
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
|
||||
},
|
||||
"is-plain-object": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||
@@ -40449,7 +40655,6 @@
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0"
|
||||
}
|
||||
@@ -40464,6 +40669,11 @@
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"iso-639-3": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/iso-639-3/-/iso-639-3-3.0.1.tgz",
|
||||
"integrity": "sha512-SdljCYXOexv/JmbQ0tvigHN43yECoscVpe2y2hlEqy/CStXQlroPhZLj7zKLRiGqLJfw8k7B973UAMDoQczVgQ=="
|
||||
},
|
||||
"isobject": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
|
||||
@@ -41054,6 +41264,14 @@
|
||||
"graceful-fs": "^4.1.9"
|
||||
}
|
||||
},
|
||||
"klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.11"
|
||||
}
|
||||
},
|
||||
"kleur": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
@@ -41598,14 +41816,6 @@
|
||||
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
|
||||
"dev": true
|
||||
},
|
||||
"merge-options": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",
|
||||
"integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",
|
||||
"requires": {
|
||||
"is-plain-obj": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
@@ -43454,6 +43664,150 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch-package": {
|
||||
"version": "6.5.1",
|
||||
"resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
|
||||
"integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
|
||||
"requires": {
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"chalk": "^4.1.2",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"find-yarn-workspace-root": "^2.0.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"is-ci": "^2.0.0",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"minimist": "^1.2.6",
|
||||
"open": "^7.4.2",
|
||||
"rimraf": "^2.6.3",
|
||||
"semver": "^5.6.0",
|
||||
"slash": "^2.0.0",
|
||||
"tmp": "^0.0.33",
|
||||
"yaml": "^1.10.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||
},
|
||||
"open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
||||
"requires": {
|
||||
"glob": "^7.1.3"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
|
||||
"requires": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="
|
||||
},
|
||||
"slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A=="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"path-browserify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
||||
@@ -44279,6 +44633,11 @@
|
||||
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
||||
"dev": true
|
||||
},
|
||||
"postinstall-postinstall": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz",
|
||||
"integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ=="
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||
@@ -45153,9 +45512,15 @@
|
||||
"integrity": "sha512-1gXJ+NzH5JKpaR23t1P8afEB7TKKfBkdXk2avhNUuTBlhBrqa2HrL4uDwYHoc4ZcwchsVC2P0Q7gP9L5Ot+KJw==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-mmkv-storage": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-mmkv-storage/-/react-native-mmkv-storage-0.8.0.tgz",
|
||||
"integrity": "sha512-L782Le5IuDYlDLGXF/qimbnzvkbYsSmV5PiDleo1DSS8Kr8Q31UK8YWtUICrDGQ9Fm7Xx4PxP9ffe2XzGeWaHQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-openid4vp-ble": {
|
||||
"version": "git+ssh://git@github.com/mosip/tuvali.git#93eb32c3f5a3a844569e60613491a8b81ca8fef8",
|
||||
"from": "react-native-openid4vp-ble@github:mosip/tuvali#v0.3.10",
|
||||
"version": "git+ssh://git@github.com/mosip/tuvali.git#cf22b7869cefda9cbd3908b73b980ae459503338",
|
||||
"from": "react-native-openid4vp-ble@github:mosip/tuvali#v0.3.11",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-permissions": {
|
||||
@@ -47859,7 +48224,6 @@
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"os-tmpdir": "~1.0.2"
|
||||
}
|
||||
@@ -50585,8 +50949,7 @@
|
||||
"yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "15.4.1",
|
||||
|
||||
10
package.json
10
package.json
@@ -10,7 +10,8 @@
|
||||
"build:android:newlogic": "cd android && ./gradlew :app:assembleNewlogicRelease && cd ..",
|
||||
"build:android:ph": "cd android && ./gradlew :app:assemblePhRelease && cd ..",
|
||||
"i18n:compile-strings": "node scripts/compile-strings.js",
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix"
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
"@digitalbazaar/ed25519-signature-2018": "digitalbazaar/ed25519-signature-2018",
|
||||
@@ -22,7 +23,6 @@
|
||||
"@expo-google-fonts/poppins": "^0.2.0",
|
||||
"@expo/metro-config": "^0.3.12",
|
||||
"@idpass/smartshare-react-native": "0.2.3-beta.2",
|
||||
"@react-native-async-storage/async-storage": "~1.15.0",
|
||||
"@react-native-community/netinfo": "7.1.3",
|
||||
"@react-native-picker/picker": "2.2.1",
|
||||
"@react-navigation/bottom-tabs": "^6.0.7",
|
||||
@@ -45,8 +45,11 @@
|
||||
"expo-status-bar": "~1.2.0",
|
||||
"expo-updates": "~0.11.6",
|
||||
"i18next": "^21.6.16",
|
||||
"iso-639-3": "^3.0.1",
|
||||
"mosip-inji-face-sdk": "^0.1.12",
|
||||
"node-forge": "^1.3.1",
|
||||
"patch-package": "^6.5.1",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"react": "17.0.1",
|
||||
"react-i18next": "^11.16.6",
|
||||
"react-native": "0.64.4",
|
||||
@@ -63,7 +66,8 @@
|
||||
"react-native-keychain": "^8.0.0",
|
||||
"react-native-linear-gradient": "^2.6.2",
|
||||
"react-native-location-enabler": "^4.1.0",
|
||||
"react-native-openid4vp-ble": "github:mosip/tuvali#v0.3.10",
|
||||
"react-native-mmkv-storage": "0.8.0",
|
||||
"react-native-openid4vp-ble": "github:mosip/tuvali#v0.3.11",
|
||||
"react-native-permissions": "^3.6.0",
|
||||
"react-native-popable": "^0.4.3",
|
||||
"react-native-qrcode-svg": "^6.1.1",
|
||||
|
||||
13
patches/react-native-mmkv-storage+0.8.0.patch
Normal file
13
patches/react-native-mmkv-storage+0.8.0.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
|
||||
index dbea26b..1b465af 100644
|
||||
--- a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
|
||||
+++ b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
|
||||
@@ -224,7 +224,7 @@ NSString *serviceName = nil;
|
||||
serviceName = _serviceName;
|
||||
}
|
||||
|
||||
-NSError * secureKeyStoreError(NSString *errMsg)
|
||||
+NSError * secureKeyStoreErrorHandler(NSString *errMsg)
|
||||
{
|
||||
NSError *error = [NSError errorWithDomain:serviceName code:200 userInfo:@{@"reason": errMsg}];
|
||||
return error;
|
||||
@@ -174,7 +174,8 @@ export const GetVcModalMachine =
|
||||
target: 'requestingUinVid',
|
||||
},
|
||||
DISMISS: {
|
||||
target: '#GetVcModal.acceptingIdInput.idle',
|
||||
actions: ['resetIdInputRef'],
|
||||
target: '#GetVcModal.acceptingIdInput',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -274,6 +275,12 @@ export const GetVcModalMachine =
|
||||
idInputRef: (_context, event) => event.idInputRef,
|
||||
}),
|
||||
|
||||
resetIdInputRef: model.assign({
|
||||
idInputRef: () => {
|
||||
return null;
|
||||
},
|
||||
}),
|
||||
|
||||
clearOtp: assign({ otp: '' }),
|
||||
|
||||
setIconColorActivate: assign({ iconColor: true }),
|
||||
|
||||
@@ -44,13 +44,13 @@ export interface Typegen0 {
|
||||
| 'error.platform.GetVcModal.requestingUinVid:invocation[0]'
|
||||
| 'xstate.init';
|
||||
focusInput:
|
||||
| 'DISMISS'
|
||||
| 'INPUT_ID'
|
||||
| 'VALIDATE_INPUT'
|
||||
| 'error.platform.GetVcModal.acceptingIdInput.requestingOtp:invocation[0]'
|
||||
| 'error.platform.GetVcModal.requestingUinVid:invocation[0]'
|
||||
| 'xstate.after(100)#GetVcModal.acceptingIdInput.focusing';
|
||||
forwardToParent: 'DISMISS';
|
||||
resetIdInputRef: 'DISMISS';
|
||||
setIconColorActivate: 'ACTIVATE_ICON_COLOR';
|
||||
setIconColorDeactivate: 'DEACTIVATE_ICON_COLOR';
|
||||
setId: 'INPUT_ID';
|
||||
@@ -76,7 +76,6 @@ export interface Typegen0 {
|
||||
};
|
||||
'eventsCausingServices': {
|
||||
AddVcModal:
|
||||
| 'DISMISS'
|
||||
| 'INPUT_ID'
|
||||
| 'xstate.after(100)#GetVcModal.acceptingIdInput.focusing';
|
||||
requestOtp: 'VALIDATE_INPUT';
|
||||
|
||||
@@ -12,7 +12,6 @@ import { Theme } from '../../../components/ui/styleUtils';
|
||||
export const HistoryTab: React.FC<HistoryTabProps> = (props) => {
|
||||
const { t } = useTranslation('HistoryTab');
|
||||
const controller = useKebabPopUp(props);
|
||||
console.log(controller.isShowActivities, 'log from activities');
|
||||
return (
|
||||
<ListItem bottomDivider onPress={controller.SHOW_ACTIVITY}>
|
||||
<ListItem.Content>
|
||||
|
||||
67
screens/Home/MyVcs/RemoveVcWarningOverlay.tsx
Normal file
67
screens/Home/MyVcs/RemoveVcWarningOverlay.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Dimensions, Image } from 'react-native';
|
||||
import { Overlay } from 'react-native-elements';
|
||||
import { Button, Column, Text, Row } from '../../../components/ui';
|
||||
import { Theme } from '../../../components/ui/styleUtils';
|
||||
|
||||
export const RemoveVcWarningOverlay: React.FC<RemoveVcWarningOverlayProps> = (
|
||||
props
|
||||
) => {
|
||||
const { t } = useTranslation('RemoveVcWarningOverlay');
|
||||
|
||||
return (
|
||||
<Overlay
|
||||
isVisible={props.isVisible}
|
||||
overlayStyle={Theme.BindingVcWarningOverlay.overlay}>
|
||||
<Column
|
||||
align="space-between"
|
||||
crossAlign="center"
|
||||
padding={'10'}
|
||||
width={Dimensions.get('screen').width * 0.8}
|
||||
height={Dimensions.get('screen').height * 0}>
|
||||
<Row align="center" crossAlign="center" margin={'0 80 -10 0'}>
|
||||
<Image source={Theme.WarningLogo} resizeMethod="auto" />
|
||||
<Text
|
||||
margin={'0 0 0 -80'}
|
||||
color={Theme.Colors.whiteText}
|
||||
weight="bold">
|
||||
!
|
||||
</Text>
|
||||
</Row>
|
||||
|
||||
<Column crossAlign="center" margin="0 0 30 0">
|
||||
<Text weight="semibold">{t('alert')}</Text>
|
||||
|
||||
<Text
|
||||
align="center"
|
||||
size="small"
|
||||
weight="semibold"
|
||||
color={Theme.Colors.GrayText}>
|
||||
{t('BindingWarning')}
|
||||
</Text>
|
||||
</Column>
|
||||
|
||||
<Button
|
||||
margin={'30 0 0 0'}
|
||||
type="gradient"
|
||||
title={t('yesConfirm')}
|
||||
onPress={props.onConfirm}
|
||||
/>
|
||||
|
||||
<Button
|
||||
margin={'10 0 0 0'}
|
||||
type="clear"
|
||||
title={t('no')}
|
||||
onPress={props.onCancel}
|
||||
/>
|
||||
</Column>
|
||||
</Overlay>
|
||||
);
|
||||
};
|
||||
|
||||
interface RemoveVcWarningOverlayProps {
|
||||
isVisible: boolean;
|
||||
onConfirm: () => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { SUPPORTED_LANGUAGES } from '../i18n';
|
||||
import { Dimensions, I18nManager } from 'react-native';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import Storage from '../shared/storage';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import i18next from 'i18next';
|
||||
import RNRestart from 'react-native-restart';
|
||||
@@ -22,7 +22,7 @@ export const SetupLanguageScreen: React.FC<RootRouteProps> = (props) => {
|
||||
const changeLanguage = async (language: string) => {
|
||||
if (language !== i18n.language) {
|
||||
await i18n.changeLanguage(language).then(async () => {
|
||||
await AsyncStorage.setItem('language', i18n.language);
|
||||
await Storage.setItem('language', i18n.language);
|
||||
const isRTL = i18next.dir(language) === 'rtl' ? true : false;
|
||||
if (isRTL !== I18nManager.isRTL) {
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { request } from '../request';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import Storage from '../storage';
|
||||
import { init } from 'mosip-inji-face-sdk';
|
||||
|
||||
const COMMON_PROPS_KEY: string =
|
||||
@@ -7,14 +7,14 @@ const COMMON_PROPS_KEY: string =
|
||||
|
||||
export default async function getAllConfigurations() {
|
||||
try {
|
||||
var response = await AsyncStorage.getItem(COMMON_PROPS_KEY);
|
||||
var response = await Storage.getItem(COMMON_PROPS_KEY);
|
||||
if (response) {
|
||||
return JSON.parse(response);
|
||||
} else {
|
||||
const resp = await request('GET', '/residentmobileapp/allProperties');
|
||||
const injiProps = resp.response;
|
||||
const injiPropsString = JSON.stringify(injiProps);
|
||||
await AsyncStorage.setItem(COMMON_PROPS_KEY, injiPropsString);
|
||||
await Storage.setItem(COMMON_PROPS_KEY, injiPropsString);
|
||||
return injiProps;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -15,6 +15,9 @@ export const MY_LOGIN_STORE_KEY = 'myLogins';
|
||||
export const VC_ITEM_STORE_KEY = (vc: Partial<VC>) =>
|
||||
`vc:${vc.idType}:${vc.id}:${vc.requestId}:${vc.isPinned}`;
|
||||
|
||||
//Regex expression to evaluate if the key is for a VC
|
||||
export const VC_ITEM_STORE_KEY_REGEX = '^vc:(UIN|VID):[0-9]+:[a-z0-9-]+$';
|
||||
|
||||
export let individualId = '';
|
||||
|
||||
export const GET_INDIVIDUAL_ID = (ind_Id: string) => {
|
||||
|
||||
62
shared/storage.ts
Normal file
62
shared/storage.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { MMKVLoader } from 'react-native-mmkv-storage';
|
||||
import { VC_ITEM_STORE_KEY_REGEX } from './constants';
|
||||
import {
|
||||
DocumentDirectoryPath,
|
||||
mkdir,
|
||||
readFile,
|
||||
unlink,
|
||||
writeFile,
|
||||
exists,
|
||||
} from 'react-native-fs';
|
||||
|
||||
const MMKV = new MMKVLoader().initialize();
|
||||
const vcKeyRegExp = new RegExp(VC_ITEM_STORE_KEY_REGEX);
|
||||
const vcDirectoryPath = `${DocumentDirectoryPath}/inji/VC`;
|
||||
|
||||
class Storage {
|
||||
static getItem = async (key: string) => {
|
||||
if (vcKeyRegExp.exec(key)) {
|
||||
const path = getFilePath(key);
|
||||
return await readFile(path, 'utf8');
|
||||
}
|
||||
return await MMKV.getItem(key);
|
||||
};
|
||||
|
||||
static setItem = async (key: string, data: string) => {
|
||||
if (vcKeyRegExp.exec(key)) {
|
||||
await mkdir(vcDirectoryPath);
|
||||
const path = getFilePath(key);
|
||||
return await writeFile(path, data, 'utf8');
|
||||
}
|
||||
await MMKV.setItem(key, data);
|
||||
};
|
||||
|
||||
static clear = async () => {
|
||||
try {
|
||||
(await exists(`${vcDirectoryPath}`)) &&
|
||||
(await unlink(`${vcDirectoryPath}`));
|
||||
MMKV.clearStore();
|
||||
} catch (e) {
|
||||
console.log('Error Occurred while Clearing Storage.', e);
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* replace ':' with '_' in the key to get the file name as ':' are not allowed in filenames
|
||||
* eg: "vc:UIN:6732935275:e7426576-112f-466a-961a-1ed9635db628" is changed to "vc_UIN_6732935275_e7426576-112f-466a-961a-1ed9635db628"
|
||||
*/
|
||||
const getFileName = (key: string) => {
|
||||
return key.split(':').join('_');
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS: /var/mobile/Containers/Data/Application/196A05AD-6B11-403D-BA2D-6DC1F30075E1/Documents/inji/VC/<filename>
|
||||
* android: /data/user/0/io.mosip.residentapp/files/inji/VC/<filename>
|
||||
* These paths are coming from DocumentDirectoryPath in react-native-fs.
|
||||
*/
|
||||
const getFilePath = (key: string) => {
|
||||
const fileName = getFileName(key);
|
||||
return `${vcDirectoryPath}/${fileName}.txt`;
|
||||
};
|
||||
|
||||
export default Storage;
|
||||
Reference in New Issue
Block a user