mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
yarn format
This commit is contained in:
@@ -264,8 +264,8 @@ const MainScreen: React.FC = () => {
|
||||
useEffect(() => {
|
||||
setIsFormComplete(
|
||||
passportNumber?.length >= 3 &&
|
||||
dateOfBirth?.length >= 6 &&
|
||||
dateOfExpiry?.length >= 6,
|
||||
dateOfBirth?.length >= 6 &&
|
||||
dateOfExpiry?.length >= 6,
|
||||
);
|
||||
}, [passportNumber, dateOfBirth, dateOfExpiry]);
|
||||
|
||||
@@ -302,15 +302,15 @@ const MainScreen: React.FC = () => {
|
||||
onPress={decrementStep}
|
||||
opacity={
|
||||
selectedTab !== 'start' &&
|
||||
selectedTab !== 'app' &&
|
||||
selectedTab !== 'splash'
|
||||
selectedTab !== 'app' &&
|
||||
selectedTab !== 'splash'
|
||||
? 1
|
||||
: 0
|
||||
}
|
||||
pointerEvents={
|
||||
selectedTab !== 'start' &&
|
||||
selectedTab !== 'app' &&
|
||||
selectedTab !== 'splash'
|
||||
selectedTab !== 'app' &&
|
||||
selectedTab !== 'splash'
|
||||
? 'auto'
|
||||
: 'none'
|
||||
}
|
||||
@@ -1017,7 +1017,7 @@ const MainScreen: React.FC = () => {
|
||||
<Text fontSize="$4">
|
||||
{
|
||||
countryCodes[
|
||||
countryCode as keyof typeof countryCodes
|
||||
countryCode as keyof typeof countryCodes
|
||||
]
|
||||
}{' '}
|
||||
{flag(getCountryISO2(countryCode))}
|
||||
|
||||
@@ -70,7 +70,7 @@ const MockDataScreen: React.FC<MockDataScreenProps> = ({
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
@@ -84,7 +84,7 @@ const MockDataScreen: React.FC<MockDataScreenProps> = ({
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
|
||||
54
app/src/types/react-native-passport-reader.d.ts
vendored
54
app/src/types/react-native-passport-reader.d.ts
vendored
@@ -1,30 +1,30 @@
|
||||
declare module 'react-native-passport-reader' {
|
||||
interface ScanOptions {
|
||||
documentNumber: string;
|
||||
dateOfBirth: string;
|
||||
dateOfExpiry: string;
|
||||
quality?: number;
|
||||
}
|
||||
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;
|
||||
}>;
|
||||
}
|
||||
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;
|
||||
}
|
||||
const PassportReader: PassportReader;
|
||||
export default PassportReader;
|
||||
}
|
||||
|
||||
@@ -124,15 +124,14 @@ const handleQRCodeScan = (
|
||||
setSelectedApp(openPassportApp);
|
||||
const passportMetadata = parsePassportData(passportData);
|
||||
|
||||
|
||||
const circuitName =
|
||||
openPassportApp.mode === 'vc_and_disclose'
|
||||
? 'vc_and_disclose'
|
||||
: getCircuitNameOld(
|
||||
'prove' as Mode,
|
||||
passportMetadata.signatureAlgorithm,
|
||||
passportMetadata.signedAttrHashFunction,
|
||||
);
|
||||
'prove' as Mode,
|
||||
passportMetadata.signatureAlgorithm,
|
||||
passportMetadata.signedAttrHashFunction,
|
||||
);
|
||||
downloadZkey(circuitName as any);
|
||||
|
||||
setSelectedTab('prove');
|
||||
|
||||
Reference in New Issue
Block a user