mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +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,6 +473,7 @@ protected:
|
|||||||
coverRateMinimum(coverRateMinValue),
|
coverRateMinimum(coverRateMinValue),
|
||||||
coverRateLiquidation(TenthBips32(params.coverRateLiquidation)));
|
coverRateLiquidation(TenthBips32(params.coverRateLiquidation)));
|
||||||
|
|
||||||
|
if (coverDepositValue != beast::zero)
|
||||||
env(coverDeposit(lender, keylet.key, coverDepositValue));
|
env(coverDeposit(lender, keylet.key, coverDepositValue));
|
||||||
|
|
||||||
env.close();
|
env.close();
|
||||||
@@ -496,7 +497,7 @@ protected:
|
|||||||
return LoanState{
|
return LoanState{
|
||||||
.previousPaymentDate = loan->at(sfPreviousPaymentDate),
|
.previousPaymentDate = loan->at(sfPreviousPaymentDate),
|
||||||
.startDate = tp{d{loan->at(sfStartDate)}},
|
.startDate = tp{d{loan->at(sfStartDate)}},
|
||||||
.nextPaymentDate = loan->at(sfNextPaymentDueDate),
|
.nextPaymentDate = loan->at(~sfNextPaymentDueDate).value_or(0),
|
||||||
.paymentRemaining = loan->at(sfPaymentRemaining),
|
.paymentRemaining = loan->at(sfPaymentRemaining),
|
||||||
.loanScale = loan->at(sfLoanScale),
|
.loanScale = loan->at(sfLoanScale),
|
||||||
.totalValue = loan->at(sfTotalValueOutstanding),
|
.totalValue = loan->at(sfTotalValueOutstanding),
|
||||||
|
|||||||
Reference in New Issue
Block a user