mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Minor test fixes
- Don't deposit cover if the amount is 0. - Handle missing next payment date in getCurrentState.
This commit is contained in:
@@ -473,7 +473,8 @@ protected:
|
||||
coverRateMinimum(coverRateMinValue),
|
||||
coverRateLiquidation(TenthBips32(params.coverRateLiquidation)));
|
||||
|
||||
env(coverDeposit(lender, keylet.key, coverDepositValue));
|
||||
if (coverDepositValue != beast::zero)
|
||||
env(coverDeposit(lender, keylet.key, coverDepositValue));
|
||||
|
||||
env.close();
|
||||
|
||||
@@ -496,7 +497,7 @@ protected:
|
||||
return LoanState{
|
||||
.previousPaymentDate = loan->at(sfPreviousPaymentDate),
|
||||
.startDate = tp{d{loan->at(sfStartDate)}},
|
||||
.nextPaymentDate = loan->at(sfNextPaymentDueDate),
|
||||
.nextPaymentDate = loan->at(~sfNextPaymentDueDate).value_or(0),
|
||||
.paymentRemaining = loan->at(sfPaymentRemaining),
|
||||
.loanScale = loan->at(sfLoanScale),
|
||||
.totalValue = loan->at(sfTotalValueOutstanding),
|
||||
|
||||
Reference in New Issue
Block a user