mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
small fixes, version bump
This commit is contained in:
@@ -608,7 +608,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = ProofOfPassport/ProofOfPassport.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 43;
|
||||
CURRENT_PROJECT_VERSION = 44;
|
||||
DEVELOPMENT_TEAM = 5B29R5LYHQ;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -743,7 +743,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = ProofOfPassport/ProofOfPassport.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 43;
|
||||
CURRENT_PROJECT_VERSION = 44;
|
||||
DEVELOPMENT_TEAM = 5B29R5LYHQ;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
||||
@@ -25,6 +25,7 @@ export const startCameraScan = async ({
|
||||
setPassportNumber(result.documentNumber);
|
||||
setDateOfBirth(formatDateToYYMMDD(result.birthDate));
|
||||
setDateOfExpiry(formatDateToYYMMDD(result.expiryDate));
|
||||
setStep(Steps.MRZ_SCAN_COMPLETED);
|
||||
amplitude.track('Camera scan successful');
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
@@ -144,7 +144,7 @@ const handleResponseIOS = async (
|
||||
|
||||
const encryptedDigestArray = Array.from(Buffer.from(signatureBase64, 'base64')).map(byte => byte > 127 ? byte - 256 : byte);
|
||||
|
||||
amplitude.track('Signature algorithm name before conversion: ' + signatureAlgorithm);
|
||||
amplitude.track('Sig alg before conversion: ' + signatureAlgorithm);
|
||||
const passportData = {
|
||||
mrz,
|
||||
signatureAlgorithm: toStandardName(signatureAlgorithm),
|
||||
@@ -156,15 +156,18 @@ const handleResponseIOS = async (
|
||||
encryptedDigest: encryptedDigestArray,
|
||||
photoBase64: "data:image/jpeg;base64," + parsed.passportPhoto,
|
||||
};
|
||||
amplitude.track('Sig alg after conversion: ' + passportData.signatureAlgorithm);
|
||||
|
||||
console.log('mrz', passportData.mrz);
|
||||
console.log('signatureAlgorithm', passportData.signatureAlgorithm);
|
||||
console.log('pubKey', passportData.pubKey);
|
||||
console.log('dataGroupHashes', [...passportData.dataGroupHashes.slice(0, 10), '...']);
|
||||
console.log('eContent', [...passportData.eContent.slice(0, 10), '...']);
|
||||
console.log('encryptedDigest', [...passportData.encryptedDigest.slice(0, 10), '...']);
|
||||
console.log('dataGroupHashes', [...passportData.dataGroupHashes]);
|
||||
console.log('eContent', [...passportData.eContent]);
|
||||
console.log('encryptedDigest', [...passportData.encryptedDigest]);
|
||||
console.log("photoBase64", passportData.photoBase64.substring(0, 100) + '...')
|
||||
|
||||
// console.log('passportData', JSON.stringify(passportData, null, 2));
|
||||
|
||||
setPassportData(passportData);
|
||||
setStep(Steps.NFC_SCAN_COMPLETED);
|
||||
};
|
||||
@@ -191,7 +194,7 @@ const handleResponseAndroid = async (
|
||||
encapContent
|
||||
} = response;
|
||||
|
||||
amplitude.track('Signature algorithm name before conversion: ' + signatureAlgorithm);
|
||||
amplitude.track('Sig alg before conversion: ' + signatureAlgorithm);
|
||||
const passportData: PassportData = {
|
||||
mrz: mrz.replace(/\n/g, ''),
|
||||
signatureAlgorithm: toStandardName(signatureAlgorithm),
|
||||
@@ -205,6 +208,7 @@ const handleResponseAndroid = async (
|
||||
encryptedDigest: JSON.parse(encryptedDigest),
|
||||
photoBase64: photo.base64,
|
||||
};
|
||||
amplitude.track('Sig alg after conversion: ' + passportData.signatureAlgorithm);
|
||||
|
||||
console.log('mrz', passportData.mrz);
|
||||
console.log('signatureAlgorithm', passportData.signatureAlgorithm);
|
||||
|
||||
@@ -49,10 +49,10 @@ export const prove = async ({
|
||||
})
|
||||
setStep(Steps.NFC_SCAN_COMPLETED);
|
||||
setGeneratingProof(false);
|
||||
amplitude.track('Signature algorithm not supported for proof right now: ' + passportData.signatureAlgorithm);
|
||||
amplitude.track('Sig alg not supported for proof: ' + passportData.signatureAlgorithm);
|
||||
return;
|
||||
}
|
||||
amplitude.track('Signature algorithm is supported: ' + passportData.signatureAlgorithm);
|
||||
amplitude.track('Sig alg supported: ' + passportData.signatureAlgorithm);
|
||||
|
||||
try {
|
||||
const inputs = generateCircuitInputs(
|
||||
@@ -75,7 +75,7 @@ export const prove = async ({
|
||||
await generateProof(inputs, setProofTime, setProof, setGeneratingProof, setStep);
|
||||
const end = Date.now();
|
||||
console.log('Total proof time from frontend:', end - start);
|
||||
amplitude.track('Proof generation successful');
|
||||
amplitude.track('Proof generation successful, took ' + ((end - start) / 1000) + ' seconds');
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.show('Error', {
|
||||
|
||||
@@ -25,13 +25,13 @@ export async function downloadZkey(
|
||||
console.log('launching zkey download')
|
||||
setDownloadStatus('downloading');
|
||||
amplitude.track('Downloading zkey...');
|
||||
const startTime = Date.now();
|
||||
|
||||
const url = Platform.OS === 'android' ? ARKZKEY_URL : ZKEY_URL
|
||||
|
||||
let previousPercentComplete = -1;
|
||||
|
||||
const options = {
|
||||
// @ts-ignore
|
||||
fromUrl: url,
|
||||
toFile: localZkeyPath,
|
||||
background: true,
|
||||
@@ -51,7 +51,8 @@ export async function downloadZkey(
|
||||
.then(() => {
|
||||
setDownloadStatus('completed')
|
||||
console.log('Download complete');
|
||||
amplitude.track('zkey download succeeded');
|
||||
const endTime = Date.now();
|
||||
amplitude.track('zkey download succeeded, took ' + ((endTime - startTime) / 1000) + ' seconds');
|
||||
RNFS.writeFile(localUrlPath, url, 'utf8');
|
||||
initMopro()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user