Skip to content

Commit

Permalink
VAL-142 Remove return values from Loan payment functions (#182)
Browse files Browse the repository at this point in the history
* Return actual value from completeFullPayment()

* Remove return value from both Loan payment functions
  • Loading branch information
ams9198 authored Feb 15, 2023
1 parent c6cb66d commit 6d01291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions contracts/Loan.sol
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ contract Loan is ILoan, BeaconImplementation {
*/
function completeNextPayment()
external
override
onlyNotPaused
onlyPermittedBorrower
onlyBorrower
atState(ILoanLifeCycleState.Active)
returns (uint256)
{
require(paymentsRemaining > 0, "Loan: No more payments remain");

Expand All @@ -423,7 +423,6 @@ contract Loan is ILoan, BeaconImplementation {
if (paymentsRemaining > 0) {
paymentDueDate += settings.paymentPeriod * 1 days;
}
return payment;
}

/**
Expand Down Expand Up @@ -451,11 +450,11 @@ contract Loan is ILoan, BeaconImplementation {
*/
function completeFullPayment()
external
override
onlyNotPaused
onlyPermittedBorrower
onlyBorrower
atState(ILoanLifeCycleState.Active)
returns (uint256)
{
uint256 scalingValue = LoanLib.RAY;

Expand Down Expand Up @@ -504,7 +503,6 @@ contract Loan is ILoan, BeaconImplementation {
_state = ILoanLifeCycleState.Matured;

IPool(_pool).onLoanStateTransitioned();
return payment;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/interfaces/ILoan.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ interface ILoan {
/**
* @dev Complete the next payment according to loan schedule inclusive of all fees.
*/
function completeNextPayment() external returns (uint256);
function completeNextPayment() external;

/**
* @dev Complete the final payment of the loan.
*/
function completeFullPayment() external returns (uint256);
function completeFullPayment() external;

/**
* @dev Allows partial repayment of outstanding principal in open-term loans.
Expand Down

0 comments on commit 6d01291

Please sign in to comment.