Skip to content

Commit

Permalink
fix app build
Browse files Browse the repository at this point in the history
  • Loading branch information
remicolin committed Jan 8, 2025
1 parent 30ced8a commit 8574020
Show file tree
Hide file tree
Showing 10 changed files with 6,309 additions and 4,747 deletions.
10 changes: 8 additions & 2 deletions app/ios/OpenPassport.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -947,7 +950,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = false;
Expand Down
10 changes: 5 additions & 5 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- amplitude-react-native (1.4.10):
- amplitude-react-native (1.4.11):
- React-Core
- boost (1.84.0)
- DoubleConversion (1.1.6)
Expand Down Expand Up @@ -1225,7 +1225,7 @@ PODS:
- React-Core
- react-native-netinfo (11.4.1):
- React-Core
- react-native-nfc-manager (3.16.0):
- react-native-nfc-manager (3.16.1):
- React-Core
- React-nativeconfig (0.75.4)
- React-NativeModulesApple (0.75.4):
Expand Down Expand Up @@ -1735,7 +1735,7 @@ CHECKOUT OPTIONS:
:git: https://github.com/vinodiOS/SwiftQRScanner

SPEC CHECKSUMS:
amplitude-react-native: 3fc003fed8453ac8131703869cc52ea626196a83
amplitude-react-native: 9d57e1bcc4175039e36283390aa3daeaea9441a5
boost: 4cb898d0bf20404aab1850c656dcea009429d6c1
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
FBLazyVector: 430e10366de01d1e3d57374500b1b150fe482e6d
Expand Down Expand Up @@ -1778,7 +1778,7 @@ SPEC CHECKSUMS:
react-native-date-picker: 5637f417bb0c1981bc9d483324d5eb5929a1651c
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
react-native-netinfo: f0a9899081c185db1de5bb2fdc1c88c202a059ac
react-native-nfc-manager: 1bcdf6f96c9065a8f4c8d9a0c6fb2db625205b2c
react-native-nfc-manager: 5213321cf6c18d879c8092c0bf56806b771ec5ac
React-nativeconfig: 31072ab0146e643594f6959c7f970a04b6c9ddd0
React-NativeModulesApple: 5df767d9a2197ac25f4d8dd2d4ae1af3624022e2
React-perflogger: 59e1a3182dca2cee7b9f1f7aab204018d46d1914
Expand Down Expand Up @@ -1813,7 +1813,7 @@ SPEC CHECKSUMS:
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
SwiftQRScanner: e85a25f9b843e9231dab89a96e441472fe54a724
SwiftyTesseract: 1f3d96668ae92dc2208d9842c8a59bea9fad2cbb
Yoga: a9ef4f5c2cd79ad812110525ef61048be6a582a4
Yoga: b05994d1933f507b0a28ceaa4fdb968dc18da178

PODFILE CHECKSUM: cc6778e0dcd4c510b705f4dc458411547dc1d00c

Expand Down
8 changes: 6 additions & 2 deletions app/src/screens/MockDataScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
15 changes: 13 additions & 2 deletions app/src/screens/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand All @@ -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"
Expand Down
30 changes: 30 additions & 0 deletions app/src/types/react-native-passport-reader.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 1 addition & 1 deletion app/src/utils/nfcScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 10 additions & 4 deletions app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"extends": "@react-native/typescript-config/tsconfig.json",
"compilerOptions": {
"lib": ["dom", "esnext"]
},
"typeRoots": ["./node_modules/@types", "./src/types"]
}
"lib": [
"dom",
"esnext"
],
"typeRoots": [
"./src/types",
"./node_modules/@types"
]
}
}
Loading

0 comments on commit 8574020

Please sign in to comment.