From 8085558b1256924ee5eb34306d5333381abdbb83 Mon Sep 17 00:00:00 2001 From: aitbc Date: Wed, 29 Apr 2026 13:11:54 +0200 Subject: [PATCH] fix: update EscrowService test to use correct createEscrow signature - Add missing _releaseTime parameter (3600 for 1 hour) - Add missing _conditionDescription parameter ("Test escrow") - Update all createEscrow calls in test file - This fixes "no matching fragment" errors --- contracts/test/EscrowService.test.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/contracts/test/EscrowService.test.js b/contracts/test/EscrowService.test.js index 9278904b..7da2d987 100644 --- a/contracts/test/EscrowService.test.js +++ b/contracts/test/EscrowService.test.js @@ -90,7 +90,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, // Standard escrow type 0, // Manual release condition - ethers.ZeroHash + 3600, // 1 hour release time + "Test escrow" ); const receipt = await tx.wait(); @@ -106,7 +107,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ) ).to.emit(escrowService, "EscrowCreated"); }); @@ -119,7 +121,8 @@ describe("EscrowService", function () { ethers.parseEther("0.0001"), // Below minimum 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ) ).to.be.reverted; }); @@ -132,7 +135,8 @@ describe("EscrowService", function () { ethers.parseEther("20000"), // Above maximum 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ) ).to.be.reverted; }); @@ -148,7 +152,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ); const receipt = await tx.wait(); escrowId = receipt.logs[0].args[0]; @@ -183,7 +188,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ); const receipt = await tx.wait(); escrowId = receipt.logs[0].args[0]; @@ -235,7 +241,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ); const receipt = await tx.wait(); escrowId = receipt.logs[0].args[0]; @@ -301,7 +308,8 @@ describe("EscrowService", function () { ESCROW_AMOUNT, 0, 0, - ethers.ZeroHash + 3600, + "Test escrow" ); const receipt = await tx.wait(); escrowId = receipt.logs[0].args[0];