diff --git a/contracts/Swaplace.sol b/contracts/Swaplace.sol index 4df0283..e5ecb00 100644 --- a/contracts/Swaplace.sol +++ b/contracts/Swaplace.sol @@ -92,7 +92,7 @@ contract Swaplace is SwapFactory, ISwaplace, IERC165 { } } - emit SwapAccepted(swapId, swap.owner, allowed); + emit SwapAccepted(swapId, swap.owner, msg.sender); return true; } diff --git a/test/TestSwaplace.test.ts b/test/TestSwaplace.test.ts index 3065cd0..68c5b2a 100644 --- a/test/TestSwaplace.test.ts +++ b/test/TestSwaplace.test.ts @@ -276,7 +276,11 @@ describe("Swaplace", async function () { ), ) .to.emit(Swaplace, "SwapAccepted") - .withArgs(await Swaplace.totalSwaps(), owner.address, zeroAddress); + .withArgs( + await Swaplace.totalSwaps(), + owner.address, + allowed.address, + ); }); it("Should be able to {acceptSwap} as N-N Swap", async function () { @@ -309,7 +313,11 @@ describe("Swaplace", async function () { ), ) .to.emit(Swaplace, "SwapAccepted") - .withArgs(await Swaplace.totalSwaps(), owner.address, zeroAddress); + .withArgs( + await Swaplace.totalSwaps(), + owner.address, + allowed.address, + ); }); it("Should be able to {acceptSwap} as P2P Swap", async function () { @@ -358,7 +366,11 @@ describe("Swaplace", async function () { ), ) .to.emit(Swaplace, "SwapAccepted") - .withArgs(await Swaplace.totalSwaps(), owner.address, zeroAddress); + .withArgs( + await Swaplace.totalSwaps(), + owner.address, + allowed.address, + ); await expect( Swaplace.connect(allowed).acceptSwap(