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

VAL-142 Return actual value from completeFullPayment() #182

Merged
merged 2 commits into from
Feb 15, 2023
Merged

VAL-142 Return actual value from completeFullPayment() #182

merged 2 commits into from
Feb 15, 2023

Conversation

ams9198
Copy link
Contributor

@ams9198 ams9198 commented Feb 14, 2023

Also happy to just remove these return values -- not sure how valuable they are. @bricestacey what do you think?

@@ -503,7 +503,7 @@ contract Loan is ILoan, BeaconImplementation {
_state = ILoanLifeCycleState.Matured;

IPool(_pool).onLoanStateTransitioned();
return payment;
return outstandingPrincipal.add(_fees.interestPayment);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? Would it be more accurate (and in the other payment function) to do interest payment + fees on top?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An on-chain caller may want to know the breakdown of payments in the return value. With an analytics platform, e.g. Dune you might want an emitted event so you can accumulate the values.

Maybe for v1 we can just make them return nothing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. I'll update.

@ams9198 ams9198 merged commit 6d01291 into circlefin:master Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants