mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
fix app build
This commit is contained in:
@@ -67,8 +67,10 @@ const MockDataScreen: React.FC<MockDataScreenProps> = ({
|
||||
let mockPassportData;
|
||||
if (isInOfacList) {
|
||||
mockPassportData = genMockPassportData(
|
||||
'sha256',
|
||||
'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
@@ -79,8 +81,10 @@ const MockDataScreen: React.FC<MockDataScreenProps> = ({
|
||||
);
|
||||
} else {
|
||||
mockPassportData = genMockPassportData(
|
||||
'sha256',
|
||||
'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
|
||||
@@ -89,11 +89,17 @@ const UserInfo: React.FC = () => {
|
||||
<Separator borderColor={separatorColor} />
|
||||
|
||||
<InfoRow
|
||||
label="Signature Algorithm Details"
|
||||
label="Curve or Exponent"
|
||||
value={passportMetaData?.curveOrExponent || 'None'}
|
||||
/>
|
||||
<Separator borderColor={separatorColor} />
|
||||
|
||||
<InfoRow
|
||||
label="Salt Length"
|
||||
value={passportMetaData?.saltLength || 'None'}
|
||||
/>
|
||||
<Separator borderColor={separatorColor} />
|
||||
|
||||
<InfoRow
|
||||
label="Signature Algorithm Bits"
|
||||
value={passportMetaData?.signatureAlgorithmBits || 'None'}
|
||||
@@ -119,10 +125,15 @@ const UserInfo: React.FC = () => {
|
||||
<Separator borderColor={separatorColor} />
|
||||
|
||||
<InfoRow
|
||||
label="CSCA Signature Algorithm Details"
|
||||
label="CSCA Curve or Exponent"
|
||||
value={passportMetaData?.cscaCurveOrExponent || 'None'}
|
||||
/>
|
||||
<Separator borderColor={separatorColor} />
|
||||
<InfoRow
|
||||
label="CSCA Salt Length"
|
||||
value={passportMetaData?.cscaSaltLength || 'None'}
|
||||
/>
|
||||
<Separator borderColor={separatorColor} />
|
||||
|
||||
<InfoRow
|
||||
label="CSCA Signature Algorithm Bits"
|
||||
|
||||
30
app/src/types/react-native-passport-reader.d.ts
vendored
Normal file
30
app/src/types/react-native-passport-reader.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
declare module 'react-native-passport-reader' {
|
||||
interface ScanOptions {
|
||||
documentNumber: string;
|
||||
dateOfBirth: string;
|
||||
dateOfExpiry: string;
|
||||
quality?: number;
|
||||
}
|
||||
|
||||
interface PassportReader {
|
||||
scan(options: ScanOptions): Promise<{
|
||||
mrz: string;
|
||||
eContent: string;
|
||||
encryptedDigest: string;
|
||||
photo: {
|
||||
base64: string;
|
||||
};
|
||||
digestAlgorithm: string;
|
||||
signerInfoDigestAlgorithm: string;
|
||||
digestEncryptionAlgorithm: string;
|
||||
LDSVersion: string;
|
||||
unicodeVersion: string;
|
||||
encapContent: string;
|
||||
documentSigningCertificate: string;
|
||||
dataGroupHashes: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
const PassportReader: PassportReader;
|
||||
export default PassportReader;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import { PassportData } from '../../../common/src/utils/types';
|
||||
import useNavigationStore from '../stores/navigationStore';
|
||||
import useUserStore from '../stores/userStore';
|
||||
import { checkInputs } from '../utils/utils';
|
||||
import { parsePassportData } from './parsePassportData';
|
||||
import { parsePassportData } from '../../../common/src/utils/parsePassportData';
|
||||
|
||||
export const scan = async (
|
||||
setModalProofStep: (modalProofStep: number) => void,
|
||||
|
||||
Reference in New Issue
Block a user