-
Notifications
You must be signed in to change notification settings - Fork 95
Supply/Repay on behalf #106
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a very simple test (for each function) checking that it's working
@@ -324,14 +324,37 @@ contract BlueTest is Test { | |||
assertEq(borrowableAsset.balanceOf(address(blue)), amountLent - amountBorrowed + amountRepaid, "blue balance"); | |||
} | |||
|
|||
function testSupplyCollateral(uint256 amount) public { | |||
function testRepayOnBehalf(uint256 amountLent, uint256 amountBorrowed, uint256 amountRepaid, address onBehalf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is also redundant with testRepay
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some variations, in the test that could be handled if if/else statements but tbh we'll to revamp test anyway, I don't think it's worth spending too much time on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we might want to make sure that it does not only check that onbehalk works when it is equal to the sender. I'm not sure if it's worth duplicating every test
I don't get why the CI is failing those lines do not even exist... |
@@ -324,14 +324,37 @@ contract BlueTest is Test { | |||
assertEq(borrowableAsset.balanceOf(address(blue)), amountLent - amountBorrowed + amountRepaid, "blue balance"); | |||
} | |||
|
|||
function testSupplyCollateral(uint256 amount) public { | |||
function testRepayOnBehalf(uint256 amountLent, uint256 amountBorrowed, uint256 amountRepaid, address onBehalf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we might want to make sure that it does not only check that onbehalk works when it is equal to the sender. I'm not sure if it's worth duplicating every test
Are you sure |
ah good point... let me check |
Fix #28
This PR supposed that we don't use meta tx (still to decide).