Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into inji-473
Browse files Browse the repository at this point in the history
  • Loading branch information
swatigoel committed Oct 20, 2023
2 parents ea3751e + 86840ed commit a0233fd
Show file tree
Hide file tree
Showing 17 changed files with 478 additions and 682 deletions.
22 changes: 17 additions & 5 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,30 @@ fileignoreconfig:
- filename: screens/WelcomeScreenController.ts
checksum: 71917c8c543a4a5b7ab61df259b785d233a80718123b0c8edf6ec81e1b3a81e0
- filename: shared/telemetry/TelemetryUtils.js
checksum: 9a61cd59a3718adf1f14faf3024fec66a3295ef373878a878a28e5cb1287afaa
- filename: machines/store.ts
checksum: bbee269bd9703644c2a345819291caa42479b5ad0d5288713da780495b2ffb49
checksum: ffe9aac2dcc590b98b0d588885c088eff189504ade653a77f74b67312bfd27ad
- filename: shared/fileStorage.ts
checksum: 07cb337dc1d5b0f0eef56270ac4f4f589260ee5e490183c024cf98a2aeafb139
- filename: shared/storage.ts
checksum: cc8486029ec4e08b70b0a2103dbd5214fba25557daaff79e30cad95202f38b16
checksum: c8d874aa373bdf526bf59192139822f56915e702ef673bac4e0d7549b0fea3d0
- filename: screens/Home/IntroSlidersScreen.tsx
checksum: 72ef913857448ef05763e52e32356faa2d1f3de8130a1c638d1897f44823031f
- filename: shared/commonUtil.ts
checksum: 01c3fdcd2f1c1757eae0c6a27fe04eb70c2aaf8660c604f3301997484592b66c
- filename: screens/Home/MyVcs/GetIdInputModal.tsx
checksum: 5c736ed79a372d0ffa7c02eb33d0dc06edbbb08d120978ff287f5f06cd6c7746
- filename: shared/openId4VCI/Utils.ts
checksum: 2bd39d84099d700e5bddeebe87dfb3b0e3075edc0a4d06ce48b428b0a85e238f
checksum: 2bd39d84099d700e5bddeebe87dfb3b0e3075edc0a4d06ce48b428b0a85e238f
- filename: machines/issuersMachine.ts
checksum: b925df13236145867fc7a1a2a703faca854e8c937dac9451008399e3937592fb
- filename: machines/issuersMachine.typegen.ts
checksum: f5e2c89f9029b1e590173e37b2cf6586d5229ecb7d4dfd4c5f050f9416d3c1cd
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.ts
checksum: eec77ca61540327ff7cab3489ebdfd47aa373fd20b3ff87a6c322cd48d35fe8f
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.typegen.ts
checksum: f1f504bd8c14496ee71f8eb7f40d54411cc05be03347d644dcc2cca187a20678
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.ts
checksum: 237a2640b7db70770d65da67c79f2929581e32f1162517e50b8d37e409f3387d
- filename: machines/store.ts
checksum: 0695d833df9ec1e1f6ae2bd81631630bb1039dec387718acb153bcb843c952cd
- filename: shared/cryptoutil/cryptoUtil.ts
checksum: b785ff3f01ab9530119072c4d38195048bfeee6155c54ea7dd031559acb722f3
4 changes: 2 additions & 2 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {Alert} from 'react-native';
import {configureTelemetry} from './shared/telemetry/TelemetryUtils';
import {MessageOverlay} from './components/MessageOverlay';
import SecureKeystore from 'react-native-secure-keystore';
import {isCustomSecureKeystore} from './shared/cryptoutil/cryptoUtil';
import {isHardwareKeystoreExists} from './shared/cryptoutil/cryptoUtil';
import i18n from './i18n';
import './shared/flipperConfig';

Expand Down Expand Up @@ -91,7 +91,7 @@ const AppInitialization: React.FC = () => {
const {t} = useTranslation('common');

useEffect(() => {
if (isCustomSecureKeystore()) {
if (isHardwareKeystoreExists) {
SecureKeystore.updatePopup(
t('biometricPopup.title'),
t('biometricPopup.description'),
Expand Down
2 changes: 1 addition & 1 deletion components/VC/MosipVCItem/MosipVCItemDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const MosipVCItemDetails: React.FC<
<Text
testID="nationalCard"
weight="bold"
style={{MinWidth: 65}}
style={{minWidth: 65}}
size="smaller"
color={Theme.Colors.Details}>
{t('nationalCard')}
Expand Down
9 changes: 6 additions & 3 deletions machines/QrLoginMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import {MY_VCS_STORE_KEY, ESIGNET_BASE_URL} from '../shared/constants';
import {StoreEvents} from './store';
import {linkTransactionResponse, VC} from '../types/VC/ExistingMosipVC/vc';
import {request} from '../shared/request';
import {getJwt, isCustomSecureKeystore} from '../shared/cryptoutil/cryptoUtil';
import {
getJwt,
isHardwareKeystoreExists,
} from '../shared/cryptoutil/cryptoUtil';
import {
getBindingCertificateConstant,
getPrivateKey,
Expand Down Expand Up @@ -363,7 +366,7 @@ export const qrLoginMachine =
sendAuthenticate: async context => {
let privateKey;
const individualId = context.selectedVc.vcMetadata.id;
if (!isCustomSecureKeystore()) {
if (!isHardwareKeystoreExists) {
privateKey = await getPrivateKey(
context.selectedVc.walletBindingResponse?.walletBindingId,
);
Expand Down Expand Up @@ -397,7 +400,7 @@ export const qrLoginMachine =
sendConsent: async context => {
let privateKey;
const individualId = context.selectedVc.vcMetadata.id;
if (!isCustomSecureKeystore()) {
if (!isHardwareKeystoreExists) {
privateKey = await getPrivateKey(
context.selectedVc.walletBindingResponse?.walletBindingId,
);
Expand Down
83 changes: 0 additions & 83 deletions machines/QrLoginMachine.typegen.ts
Original file line number Diff line number Diff line change
@@ -1,83 +0,0 @@
// This file was automatically generated. Edits will be overwritten

export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
'done.invoke.QrLogin.linkTransaction:invocation[0]': {
type: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.QrLogin.sendingAuthenticate:invocation[0]': {
type: 'done.invoke.QrLogin.sendingAuthenticate:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'error.platform.QrLogin.linkTransaction:invocation[0]': {
type: 'error.platform.QrLogin.linkTransaction:invocation[0]';
data: unknown;
};
'error.platform.QrLogin.sendingAuthenticate:invocation[0]': {
type: 'error.platform.QrLogin.sendingAuthenticate:invocation[0]';
data: unknown;
};
'error.platform.QrLogin.sendingConsent:invocation[0]': {
type: 'error.platform.QrLogin.sendingConsent:invocation[0]';
data: unknown;
};
'xstate.init': {type: 'xstate.init'};
};
invokeSrcNameMap: {
linkTransaction: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
sendAuthenticate: 'done.invoke.QrLogin.sendingAuthenticate:invocation[0]';
sendConsent: 'done.invoke.QrLogin.sendingConsent:invocation[0]';
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
SetErrorMessage:
| 'error.platform.QrLogin.linkTransaction:invocation[0]'
| 'error.platform.QrLogin.sendingAuthenticate:invocation[0]'
| 'error.platform.QrLogin.sendingConsent:invocation[0]';
expandLinkTransResp: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
forwardToParent: 'DISMISS';
loadMyVcs: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
loadThumbprint: 'CONFIRM';
resetLinkTransactionId: 'GET';
resetSelectedVoluntaryClaims: 'GET';
setClaims: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
setConsentClaims: 'TOGGLE_CONSENT_CLAIM';
setLinkedTransactionId: 'done.invoke.QrLogin.sendingAuthenticate:invocation[0]';
setMyVcs: 'STORE_RESPONSE';
setScanData: 'GET';
setSelectedVc: 'SELECT_VC';
setThumbprint: 'STORE_RESPONSE';
setlinkTransactionResponse: 'done.invoke.QrLogin.linkTransaction:invocation[0]';
};
eventsCausingDelays: {};
eventsCausingGuards: {};
eventsCausingServices: {
linkTransaction: 'GET';
sendAuthenticate: never;
sendConsent: 'STORE_RESPONSE';
};
matchesStates:
| 'ShowError'
| 'done'
| 'faceAuth'
| 'invalidIdentity'
| 'linkTransaction'
| 'loadMyVcs'
| 'loadingThumbprint'
| 'requestConsent'
| 'sendingAuthenticate'
| 'sendingConsent'
| 'showvcList'
| 'success'
| 'waitingForData';
tags: never;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {VCMetadata} from '../../../shared/VCMetadata';
import {VC} from '../../../types/VC/ExistingMosipVC/vc';
import {
generateKeys,
isCustomSecureKeystore,
isHardwareKeystoreExists,
WalletBindingResponse,
} from '../../../shared/cryptoutil/cryptoUtil';
import {log} from 'xstate/lib/actions';
Expand Down Expand Up @@ -632,7 +632,7 @@ export const EsignetMosipVCItemMachine = model.createMachine(
),
setPublicKey: assign({
publicKey: (context, event) => {
if (!isCustomSecureKeystore()) {
if (!isHardwareKeystoreExists) {
return (event.data as KeyPair).public;
}
return event.data as string;
Expand Down Expand Up @@ -788,7 +788,7 @@ export const EsignetMosipVCItemMachine = model.createMachine(
return walletResponse;
},
generateKeyPair: async context => {
if (!isCustomSecureKeystore()) {
if (!isHardwareKeystoreExists) {
return await generateKeys();
}
const isBiometricsEnabled = SecureKeystore.hasBiometricsEnabled();
Expand Down Expand Up @@ -825,7 +825,7 @@ export const EsignetMosipVCItemMachine = model.createMachine(
return vc != null;
},

isCustomSecureKeystore: () => isCustomSecureKeystore(),
isCustomSecureKeystore: () => isHardwareKeystoreExists,
},
},
);
Expand Down
Loading

0 comments on commit a0233fd

Please sign in to comment.