From 1b31dbc4c9bc608875eafa786c538d0e14ca1bcc Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Mon, 6 Oct 2025 16:33:05 -0400 Subject: [PATCH] Fix build errors --- src/xrpld/app/misc/LendingHelpers.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xrpld/app/misc/LendingHelpers.h b/src/xrpld/app/misc/LendingHelpers.h index 9fef0e82d8..24d87e9b17 100644 --- a/src/xrpld/app/misc/LendingHelpers.h +++ b/src/xrpld/app/misc/LendingHelpers.h @@ -166,7 +166,6 @@ computePaymentComponents( "ripple::detail::computePaymentComponents", "last payment is complete"); - Number const interest = totalValueOutstanding - principalOutstanding; return { .rawInterest = rawInterest, .rawPrincipal = referencePrincipal, @@ -830,7 +829,6 @@ loanMakePayment( auto totalValueOutstandingProxy = loan->at(sfTotalValueOutstanding); auto interestOwedProxy = loan->at(sfInterestOwed); auto referencePrincipalProxy = loan->at(sfReferencePrincipal); - bool const allowOverpayment = loan->isFlag(lsfLoanOverpayment); TenthBips32 const interestRate{loan->at(sfInterestRate)}; TenthBips32 const lateInterestRate{loan->at(sfLateInterestRate)}; @@ -1035,7 +1033,7 @@ loanMakePayment( // ------------------------------------------------------------- // overpayment handling Number overpaymentInterestPortion = 0; - if (allowOverpayment) + if (loan->isFlag(lsfLoanOverpayment)) { Number const overpayment = std::min( principalOutstandingProxy.value(), @@ -1068,8 +1066,8 @@ loanMakePayment( } } - loanValueChange = - (newInterest - totalInterestOutstanding) + overpaymentInterestPortion; + totalParts.valueChange += (newTotalInterest - totalInterestOutstanding) + + overpaymentInterestPortion; // Check the final results are rounded, to double-check that the // intermediate steps were rounded.