mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
@@ -2,21 +2,22 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
| Requirement | Version | Installation Guide |
|
||||
| ----------- | ------- | -------------------------------------------------------- |
|
||||
| nodejs | > v18 | [Install nodejs](https://nodejs.org/) |
|
||||
| circom | Latest | [Install circom](https://docs.circom.io/) |
|
||||
| snarkjs | Latest | [Install snarkjs](https://github.com/iden3/snarkjs) |
|
||||
| watchman | Latest | [Install watchman](https://facebook.github.io/watchman/) |
|
||||
| Requirement | Version | Installation Guide |
|
||||
| ----------- | -------- | ------------------------------------------------------------------------ |
|
||||
| nodejs | > v18 | [Install nodejs](https://nodejs.org/) |
|
||||
| ruby | >= 3.1.0 | [Install ruby](https://www.ruby-lang.org/en/documentation/installation/) |
|
||||
| circom | Latest | [Install circom](https://docs.circom.io/) |
|
||||
| snarkjs | Latest | [Install snarkjs](https://github.com/iden3/snarkjs) |
|
||||
| watchman | Latest | [Install watchman](https://facebook.github.io/watchman/) |
|
||||
|
||||
### Android
|
||||
|
||||
| Requirement | Version | Installation Guide |
|
||||
| -------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Java | 17 | [Install Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html) |
|
||||
| Android Studio | Latest | [Install Android Studio](https://developer.android.com/studio) |
|
||||
| Android SDK | Latest | [Install Android SDK](https://developer.android.com/studio#downloads) |
|
||||
| Android Ndk | 23.1.7779620 | [Install NDK](https://developer.android.com/studio) or [GPT4 guide](https://chatgpt.com/share/a6e2544b-d32a-4554-a452-402511d03ffc) |
|
||||
| Requirement | Version | Installation Guide |
|
||||
| -------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Java | 17 | [Install Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html) |
|
||||
| Android Studio | Latest | [Install Android Studio](https://developer.android.com/studio) |
|
||||
| Android SDK | Latest | [Install Android SDK](https://developer.android.com/studio#downloads) |
|
||||
| Android Ndk | 26.1.10909125 | [Install NDK](https://developer.android.com/studio) or [GPT4 guide](https://chatgpt.com/share/a6e2544b-d32a-4554-a452-402511d03ffc) |
|
||||
|
||||
### iOS
|
||||
|
||||
@@ -28,6 +29,7 @@
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
yarn install-app
|
||||
```
|
||||
|
||||
|
||||
@@ -4,15 +4,17 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
"clean": "watchman watch-del-all && rm -rf node_modules ios/Pods ios/build android/app/build android/build .yarn/cache",
|
||||
"fmt": "prettier --check .",
|
||||
"fmt:fix": "prettier --write .",
|
||||
"ia": "yarn install-app",
|
||||
"install-app": "cd ../common && yarn && cd ../app && yarn && cd ios && pod install && cd ..",
|
||||
"ios": "react-native run-ios",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint --fix .",
|
||||
"fmt": "prettier --check .",
|
||||
"fmt:fix": "prettier --write .",
|
||||
"nice": "yarn fmt:fix && yarn lint:fix",
|
||||
"start": "watchman watch-del-all && react-native start",
|
||||
"test": "jest --passWithNoTests",
|
||||
"install-app": "cd ../common && yarn && cd ../app && yarn && cd ios && pod install && cd ..",
|
||||
"ia": "yarn install-app "
|
||||
"test": "jest --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amplitude/analytics-react-native": "^1.4.7",
|
||||
@@ -84,8 +86,8 @@
|
||||
"react-test-renderer": "18.3.1",
|
||||
"typescript": "5.0.4"
|
||||
},
|
||||
"packageManager": "yarn@4.5.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"packageManager": "yarn@4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,34 +64,19 @@ const MockDataScreen: React.FC<MockDataScreenProps> = ({
|
||||
.toUpperCase();
|
||||
await new Promise(resolve =>
|
||||
setTimeout(() => {
|
||||
let mockPassportData;
|
||||
if (isInOfacList) {
|
||||
mockPassportData = genMockPassportData(
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
castDate(expiryYears),
|
||||
randomPassportNumber,
|
||||
'HENAO MONTOYA', // this name is the OFAC list
|
||||
'ARCANGEL DE JESUS',
|
||||
);
|
||||
} else {
|
||||
mockPassportData = genMockPassportData(
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
selectedAlgorithm == 'rsa sha1' ? 'sha1' : 'sha256',
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
castDate(expiryYears),
|
||||
randomPassportNumber,
|
||||
);
|
||||
}
|
||||
const hashAlgo = selectedAlgorithm === 'rsa sha1' ? 'sha1' : 'sha256';
|
||||
const mockPassportData = genMockPassportData(
|
||||
hashAlgo,
|
||||
hashAlgo,
|
||||
signatureAlgorithmToStrictSignatureAlgorithm[
|
||||
selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm
|
||||
],
|
||||
selectedCountry as keyof typeof countryCodes,
|
||||
castDate(-age),
|
||||
castDate(expiryYears),
|
||||
randomPassportNumber,
|
||||
...(isInOfacList ? ['HENAO MONTOYA', 'ARCANGEL DE JESUS'] : []),
|
||||
);
|
||||
useUserStore.getState().registerPassportData(mockPassportData);
|
||||
useUserStore.getState().setRegistered(true);
|
||||
resolve(null);
|
||||
|
||||
Reference in New Issue
Block a user