make proving work with new circuits

This commit is contained in:
0xturboblitz
2024-08-22 16:01:40 +08:00
parent 79d8f18621
commit 2ff419a10f
2 changed files with 5 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ const ProveScreen: React.FC<ProveScreenProps> = ({ setSheetRegisterIsOpen }) =>
const inputs = generateCircuitInputsProve(
passportData,
121, 17,
64, 32,
scope,
revealBitmapFromAttributes(selectedApp.disclosureOptions as any),
(selectedApp.disclosureOptions && selectedApp.disclosureOptions.older_than) ? selectedApp.disclosureOptions.older_than : DEFAULT_MAJORITY,

View File

@@ -82,8 +82,8 @@ const useUserStore = create<UserState>((set, get) => ({
// - If the commitment is not present in the tree, proceed to main screen AND try registering it in the background
initUserStore: async () => {
// download zkeys if they are not already downloaded
downloadZkey("register_sha256WithRSAEncryption_65537"); // might move after nfc scanning
downloadZkey("disclose");
downloadZkey("prove_rsa_65537_sha256"); // might move after nfc scanning
// downloadZkey("disclose");
const secret = await loadSecretOrCreateIt();
set({ secret });
@@ -97,7 +97,8 @@ const useUserStore = create<UserState>((set, get) => ({
return;
}
const isAlreadyRegistered = await isCommitmentRegistered(secret, JSON.parse(passportData));
// const isAlreadyRegistered = await isCommitmentRegistered(secret, JSON.parse(passportData));
const isAlreadyRegistered = true
if (!isAlreadyRegistered) {
console.log("not registered but passport data found, skipping to nextScreen")