mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Fixed bugs
This commit is contained in:
parent
70f097571c
commit
6f8767a505
|
@ -30,6 +30,7 @@ contract DydxFlashloaner is ICallee, DydxFlashloanBase {
|
|||
Account.Info memory account,
|
||||
bytes memory data
|
||||
) public {
|
||||
require(sender == address(this), "not-same-sender");
|
||||
CastData memory cd = abi.decode(data, (CastData));
|
||||
|
||||
IERC20 tokenContract;
|
||||
|
@ -73,6 +74,8 @@ contract DydxFlashloaner is ICallee, DydxFlashloanBase {
|
|||
solo.operate(accountInfos, operations);
|
||||
|
||||
uint finBal = _tokenContract.balanceOf(address(this));
|
||||
require(sub(iniBal, finBal) < 10, "amount-paid-less");
|
||||
require(sub(iniBal, finBal) < 5, "amount-paid-less");
|
||||
}
|
||||
|
||||
receive() external payable {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user