fix details

This commit is contained in:
0xturboblitz
2024-05-21 16:33:52 +09:00
parent 4facd39e63
commit 07f6694bef
3 changed files with 6 additions and 14 deletions

View File

@@ -240,7 +240,7 @@ class ZKPUseCase(val context: Context) {
Log.e("ZKPUseCase", "zkey_path: $zkey_path")
val verification = zkpTool.groth16_prover_zkey_file(
val proofGen = zkpTool.groth16_prover_zkey_file(
zkey_path,
witnessData,
witnessLen[0],
@@ -252,14 +252,14 @@ class ZKPUseCase(val context: Context) {
256
)
Log.e("ZKPUseCase", "Verification res: $verification")
Log.e("ZKPUseCase", "proofGen res: $proofGen")
if (verification == 2) {
throw Exception("Not enough memory for verification ${msg.decodeToString()}")
if (proofGen == 2) {
throw Exception("Not enough memory for proofGen ${msg.decodeToString()}")
}
if (verification == 1) {
throw Exception("Error during verification ${msg.decodeToString()}")
if (proofGen == 1) {
throw Exception("Error during proofGen ${msg.decodeToString()}")
}
val proofDataZip = proofData.copyOfRange(0, proofLen[0].toInt())

View File

@@ -19,7 +19,6 @@ import { Pressable } from "react-native";
import { COMMITMENT_TREE_TRACKER_URL, PASSPORT_ATTESTATION_ID, RPC_URL } from "../../../common/src/constants/constants";
import { poseidon2 } from "poseidon-lite";
import axios from 'axios';
// import https from 'https'
import { LeanIMT } from "@zk-kit/imt";
const sepolia = () => (
@@ -131,9 +130,6 @@ export const sbtApp: AppType = {
// const serializedCommitmentTree = await axios.get(COMMITMENT_TREE_TRACKER_URL)
// console.log('Fetching commitment tree from:', COMMITMENT_TREE_TRACKER_URL);
// const response = await RNFetchBlob.config({
// trusty: true, // This allows self-signed certificates
// }).fetch('GET', 'https://34.222.134.21/api/download-merkle-tree');
// const serializedCommitmentTree = await response.json();
// console.log(serializedCommitmentTree);

View File

@@ -71,10 +71,6 @@ const useUserStore = create<UserState>((set, get) => ({
});
useNavigationStore.getState().setStep(Steps.NFC_SCAN_COMPLETED); // this currently means go to app selection screen
// download zkeys if they are not already downloaded
downloadZkey("register_sha256WithRSAEncryption_65537"); // might move after nfc scanning
downloadZkey("disclose");
// TODO: check if the commitment is already registered, if not retry registering it
// set({