yarn format

This commit is contained in:
turnoffthiscomputer
2025-01-10 16:38:07 +01:00
parent 9b8d4216f4
commit 80d5d78b5e
5 changed files with 43 additions and 50 deletions

View File

@@ -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))}

View File

@@ -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),

View File

@@ -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;
}

View File

@@ -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');