From c2c882e796ba96c17199226be5de3c94c30557cf Mon Sep 17 00:00:00 2001 From: Eduardo Melo Date: Wed, 14 Aug 2024 16:46:16 -0300 Subject: [PATCH] fix: reentrancy --- test/OriumSftMarketplace.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/OriumSftMarketplace.test.ts b/test/OriumSftMarketplace.test.ts index 67ecbd2..788f549 100644 --- a/test/OriumSftMarketplace.test.ts +++ b/test/OriumSftMarketplace.test.ts @@ -723,7 +723,7 @@ describe('OriumSftMarketplace', () => { ).to.be.revertedWith('OriumSftMarketplace: Insufficient native token amount') }) - it('should detect reentrancy attack during fee transfer', async () => { + it.only('should detect reentrancy attack during fee transfer', async () => { const AttackContract = await ethers.getContractFactory('ReentrancyAttack') attackContract = (await AttackContract.deploy(marketplace)) as ReentrancyAttack await attackContract.waitForDeployment() @@ -745,7 +745,7 @@ describe('OriumSftMarketplace', () => { }) await expect( - borrower.sendTransaction({ + lender.sendTransaction({ to: attackContract.getAddress(), value: toWei('1'), }),