@@ -201,16 +201,16 @@ contract EscrowSupplierNFT is IEscrowSupplierNFT, BaseNFT {
201201 offerId = nextOfferId++ ;
202202 offers[offerId] = OfferStored ({
203203 supplier: msg .sender ,
204+ maxDuration: SafeCast.toUint32 (maxDuration),
204205 gracePeriod: SafeCast.toUint32 (gracePeriod),
205206 interestAPR: SafeCast.toUint24 (interestAPR),
206207 lateFeeAPR: SafeCast.toUint24 (lateFeeAPR),
207208 minEscrow: minEscrow,
208- available: amount,
209- maxDuration: maxDuration
209+ available: amount
210210 });
211211 asset.safeTransferFrom (msg .sender , address (this ), amount);
212212 emit OfferCreated (
213- msg .sender , interestAPR, gracePeriod, lateFeeAPR, amount, offerId, minEscrow
213+ msg .sender , interestAPR, maxDuration, gracePeriod, lateFeeAPR, amount, offerId, minEscrow
214214 );
215215 }
216216
@@ -443,7 +443,7 @@ contract EscrowSupplierNFT is IEscrowSupplierNFT, BaseNFT {
443443 // check params are supported
444444 require (configHub.isValidCollarDuration (duration), "escrow: unsupported duration " );
445445
446- (uint expectedFees ,,) = _upfrontFees (offerId, escrowed, duration);
446+ (uint expectedFees ,,) = upfrontFees (offerId, escrowed, duration);
447447 // we don't check equality to avoid revert due to minor inaccuracies to the upside,
448448 // even though exact value should be used from the view.
449449 // The overpayment is refunded when escrow is properly released (but not when seized).
@@ -461,13 +461,13 @@ contract EscrowSupplierNFT is IEscrowSupplierNFT, BaseNFT {
461461 escrows[escrowId] = EscrowStored ({
462462 offerId: SafeCast.toUint64 (offerId),
463463 loanId: SafeCast.toUint64 (loanId),
464+ duration: SafeCast.toUint32 (duration),
464465 expiration: SafeCast.toUint32 (block .timestamp + duration),
465466 released: false , // unset until release
466467 loans: msg .sender ,
467468 escrowed: escrowed,
468469 feesHeld: fees,
469- withdrawable: 0 , // unset until release
470- duration: SafeCast.toUint32 (duration)
470+ withdrawable: 0 // unset until release
471471 });
472472
473473 // emit before token transfer event in mint for easier indexing
0 commit comments