Skip to content

Commit

Permalink
fix: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EDUARDO MELO DE SIQUEIRA authored and EDUARDO MELO DE SIQUEIRA committed Jun 18, 2024
1 parent b263e4b commit d18de09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions test/NftRentalMarketplace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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',
)
})
})
Expand Down

0 comments on commit d18de09

Please sign in to comment.