From d18de091c1cb3e703ca2f0aba3e9170b252a0e84 Mon Sep 17 00:00:00 2001 From: EDUARDO MELO DE SIQUEIRA Date: Tue, 18 Jun 2024 01:54:14 -0300 Subject: [PATCH] fix: resolve comments --- contracts/NftRentalMarketplace.sol | 2 +- test/NftRentalMarketplace.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/NftRentalMarketplace.sol b/contracts/NftRentalMarketplace.sol index 2341e9c..cfd06bd 100644 --- a/contracts/NftRentalMarketplace.sol +++ b/contracts/NftRentalMarketplace.sol @@ -116,7 +116,7 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr for (uint256 i = 0; i < _offer.roles.length; i++) { require( roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] < block.timestamp, - 'NftRentalMarketplace: role still has an active offer' + 'NftRentalMarketplace: role still has an active offer or rental' ); roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] = _offer.deadline - _offer.minDuration; } diff --git a/test/NftRentalMarketplace.test.ts b/test/NftRentalMarketplace.test.ts index 3615e35..57a1d7d 100644 --- a/test/NftRentalMarketplace.test.ts +++ b/test/NftRentalMarketplace.test.ts @@ -300,7 +300,7 @@ describe('NftRentalMarketplace', () => { await marketplace.connect(lender).createRentalOffer(rentalOffer) rentalOffer.nonce = `0x${randomBytes(32).toString('hex')}` await expect(marketplace.connect(lender).createRentalOffer(rentalOffer)).to.be.revertedWith( - 'NftRentalMarketplace: role still has an active offer', + 'NftRentalMarketplace: role still has an active offer or rental', ) }) it('Should NOT create more than one rental when the (Deadline - minduration) is not be reached. ', async () => { @@ -311,7 +311,7 @@ describe('NftRentalMarketplace', () => { rentalOffer.nonce = `0x${randomBytes(32).toString('hex')}` await expect(marketplace.connect(lender).createRentalOffer(rentalOffer)).to.be.revertedWith( - 'NftRentalMarketplace: role still has an active offer', + 'NftRentalMarketplace: role still has an active offer or rental', ) }) })