mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-23 23:20:33 +00:00
refactor: Address review feedback on payment-type split
Extract loanRatesFor() to replace the identical 4-line managementFeeRate/interestRate/periodicRate preamble repeated in makeFullPayment, makeLatePayment, and makeRegularPayment. Clarify the constructLoanState(SLE::const_ref) doc comment to note it's an overload of the 3-Number constructLoanState() above it, rather than reading as a standalone function.
This commit is contained in:
@@ -263,8 +263,9 @@ constructLoanState(
|
||||
Number const& principalOutstanding,
|
||||
Number const& managementFeeOutstanding);
|
||||
|
||||
// Constructs a valid LoanState object from a Loan object, which always has
|
||||
// rounded values
|
||||
// Overload of constructLoanState() that reads the three tracked fields
|
||||
// directly from a Loan ledger object, which always holds rounded values,
|
||||
// rather than taking them as separate Number arguments.
|
||||
LoanState
|
||||
constructLoanState(SLE::const_ref loan);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user