Skip to content

Commit

Permalink
test: fix failures after change of max interest rate
Browse files Browse the repository at this point in the history
  • Loading branch information
danielattilasimon committed Jan 15, 2025
1 parent b604037 commit aa58adc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/test/interestBatchManagement.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ contract InterestBatchManagementTest is DevTestSetup {
LatestTroveData memory trove = troveManager.getLatestTroveData(troveId);
uint256 annualInterestRate = trove.annualInterestRate;

uint256 newAnnualInterestRate = 101e16;
uint256 newAnnualInterestRate = MAX_ANNUAL_INTEREST_RATE + 1;
assertEq(tmBatchManagerAddress, B, "Wrong batch manager in TM");
assertNotEq(newAnnualInterestRate, annualInterestRate, "New interest rate should be different");

Expand Down
6 changes: 4 additions & 2 deletions contracts/test/interestIndividualDelegation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ contract InterestIndividualDelegationTest is DevTestSetup {
// Set batch manager (B)
vm.startPrank(A);
vm.expectRevert(BorrowerOperations.InterestRateTooHigh.selector);
borrowerOperations.setInterestIndividualDelegate(troveId, C, 1e16, 101e16, 0, 0, 0, 10000e18, 0);
borrowerOperations.setInterestIndividualDelegate(
troveId, C, 1e16, uint128(MAX_ANNUAL_INTEREST_RATE) + 1, 0, 0, 0, 10000e18, 0
);
vm.stopPrank();
}

Expand Down Expand Up @@ -247,7 +249,7 @@ contract InterestIndividualDelegationTest is DevTestSetup {
vm.stopPrank();

// Try to switch to individual delegate (C) along with new interest
uint256 newAnnualInterestRate = 101e16;
uint256 newAnnualInterestRate = MAX_ANNUAL_INTEREST_RATE + 1;
vm.startPrank(A);
vm.expectRevert(BorrowerOperations.InterestRateTooHigh.selector);
borrowerOperations.setInterestIndividualDelegate(
Expand Down

0 comments on commit aa58adc

Please sign in to comment.