Skip to content

Commit

Permalink
fix unit
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Nov 11, 2024
1 parent c101fcf commit e012087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions test/verifier/universal-verifier.events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe("Universal Verifier events", function () {

const coder = AbiCoder.defaultAbiCoder();
logs.map((log, index) => {
const [decodedData] = coder.decode(abi as any, log.args.data);
const [decodedData] = coder.decode(encodedDataAbi as any, log.args.data);
expect(decodedData.schema).to.equal(queries[index].schema);
expect(decodedData.claimPathKey).to.equal(queries[index].claimPathKey);
expect(decodedData.operator).to.equal(queries[index].operator);
Expand Down Expand Up @@ -156,8 +156,7 @@ describe("Universal Verifier events", function () {

const coder = AbiCoder.defaultAbiCoder();
logs.map((log) => {
// @ts-ignore
const [decodedData] = coder.decode(encodedDataAbi, log.args.data);
const [decodedData] = coder.decode(encodedDataAbi as any, log.args.data);
expect(decodedData.schema).to.equal(queries[1].schema);
expect(decodedData.claimPathKey).to.equal(queries[1].claimPathKey);
expect(decodedData.operator).to.equal(queries[1].operator);
Expand Down
8 changes: 4 additions & 4 deletions test/verifier/universal-verifier.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ describe("Universal Verifier MTP & SIG validators", function () {

await verifier.connect(requestOwner).setZKPRequest(requestId, {
metadata: "metadata",
validator: await sig.getAddress(),
validator: await sigValidator.getAddress(),
data: data,
});

Expand All @@ -328,14 +328,14 @@ describe("Universal Verifier MTP & SIG validators", function () {
await expect(
verifier.connect(requestOwner).updateZKPRequest(requestId, {
metadata: "metadata",
validator: await sig.getAddress(),
validator: await sigValidator.getAddress(),
data: data,
}),
).to.be.revertedWithCustomError(verifier, "OwnableUnauthorizedAccount");

await verifier.connect(owner).updateZKPRequest(requestId, {
metadata: "metadata2",
validator: await sig.getAddress(),
validator: await sigValidator.getAddress(),
data: data,
});

Expand All @@ -351,7 +351,7 @@ describe("Universal Verifier MTP & SIG validators", function () {
await expect(
verifier.connect(owner).updateZKPRequest(requestId, {
metadata: "metadata",
validator: await sig.getAddress(),
validator: await sigValidator.getAddress(),
data: data,
}),
).to.be.rejectedWith("equest id doesn't exis");
Expand Down

0 comments on commit e012087

Please sign in to comment.