Skip to content

Commit

Permalink
fix: update rental date acceptOffer
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 17, 2024
1 parent e69681f commit e7eb859
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr
_offer.rolesData
);

// for (uint256 i = 0; i < _offer.roles.length; i++) {
// roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] - _expirationDate;
// }
for (uint256 i = 0; i < _offer.roles.length; i++) {
if(_expirationDate > roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId]) {
roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] = _expirationDate;
}
}

rentals[_offerHash] = Rental({ borrower: msg.sender, expirationDate: _expirationDate });

Expand Down

0 comments on commit e7eb859

Please sign in to comment.