Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all compile-time warnings #118

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion contracts/Loan.sol
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ contract Loan is ILoan {
serviceConfiguration,
settings.duration,
settings.paymentPeriod,
settings.loanType,
settings.principal,
liquidityAsset
);
Expand Down
4 changes: 1 addition & 3 deletions contracts/controllers/WithdrawController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ contract WithdrawController is IWithdrawController {
view
returns (uint256 shares)
{
IPoolWithdrawState memory withdrawState = _currentWithdrawState(
msg.sender
);
IPoolWithdrawState memory withdrawState = _currentWithdrawState(owner);
shares = PoolLib.calculateConversion(
assets,
withdrawState.redeemableShares,
Expand Down
5 changes: 3 additions & 2 deletions contracts/libraries/LoanLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ library LoanLib {
IServiceConfiguration config,
uint256 duration,
uint256 paymentPeriod,
ILoanType loanType,
uint256 principal,
address liquidityAsset
) external {
) external view {
require(duration > 0, "LoanLib: Duration cannot be zero");
require(paymentPeriod > 0, "LoanLib: Payment period cannot be zero");
require(
Expand Down Expand Up @@ -325,6 +324,8 @@ library LoanLib {
if (blockTimestamp > paymentDueDate) {
return settings.latePayment;
}

return 0;
}

/**
Expand Down