mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
add staging commitment tree url
This commit is contained in:
@@ -87,7 +87,7 @@ export async function generateTeeInputsVCAndDisclose(
|
||||
|
||||
const { passportNoAndNationalitySMT, nameAndDobSMT, nameAndYobSMT } =
|
||||
await getOfacSMTs();
|
||||
const serialized_tree = await getCommitmentTree();
|
||||
const serialized_tree = await getCommitmentTree(passportData.documentType);
|
||||
const tree = LeanIMT.import((a, b) => poseidon2([a, b]), serialized_tree);
|
||||
console.log('tree', tree);
|
||||
// const commitment = generateCommitment(
|
||||
|
||||
@@ -206,7 +206,7 @@ export async function isUserRegistered(
|
||||
PASSPORT_ATTESTATION_ID,
|
||||
passportData,
|
||||
);
|
||||
const serializedTree = await getCommitmentTree();
|
||||
const serializedTree = await getCommitmentTree(passportData.documentType);
|
||||
const tree = LeanIMT.import((a, b) => poseidon2([a, b]), serializedTree);
|
||||
const index = tree.indexOf(BigInt(commitment));
|
||||
return index !== -1;
|
||||
|
||||
Reference in New Issue
Block a user