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

Add checks to setInterestIndividualDelegate #403

Merged
merged 4 commits into from
Sep 4, 2024
Merged

Add checks to setInterestIndividualDelegate #403

merged 4 commits into from
Sep 4, 2024

Conversation

bingen
Copy link
Collaborator

@bingen bingen commented Sep 3, 2024

Closes #379
Closes #404

@bingen bingen added the Dedaub label Sep 3, 2024
@bingen bingen self-assigned this Sep 3, 2024
Copy link
Collaborator

@danielattilasimon danielattilasimon left a comment

Choose a reason for hiding this comment

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

Looks good, but I would remove the requirement on _newAnnualInterestRate.

interestIndividualDelegateOf[_troveId] =
InterestIndividualDelegate(_delegate, _minInterestRate, _maxInterestRate);
// Can’t have both individual delegation and batch manager
if (interestBatchManagerOf[_troveId] != address(0)) {
_requireInterestRateInRange(_newAnnualInterestRate, _minInterestRate, _maxInterestRate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed on Slack, I don't see the need for this requirement.

@bingen bingen merged commit e9cc36d into main Sep 4, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants