mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
bug fixes
This commit is contained in:
parent
64569a7185
commit
aafe8e28c4
|
@ -187,10 +187,11 @@ abstract contract InstaLiteConnector is Events, Basic {
|
||||||
address(this)
|
address(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
_astethAmt = astethToken.balanceOf(address(this)) -
|
_astethAmt =
|
||||||
initialBalStETH;
|
astethToken.balanceOf(address(this)) -
|
||||||
|
initialBalAsteth;
|
||||||
_ethAmt = address(this).balance - initialBalEth;
|
_ethAmt = address(this).balance - initialBalEth;
|
||||||
_stethAmt = stethToken.balanceOf(address(this));
|
_stethAmt = stethToken.balanceOf(address(this)) - initialBalSteth;
|
||||||
require(_deleverageAmt <= (1e9 + _astethAmt), "lack-of-steth");
|
require(_deleverageAmt <= (1e9 + _astethAmt), "lack-of-steth");
|
||||||
|
|
||||||
if (setIds.length >= 3) {
|
if (setIds.length >= 3) {
|
||||||
|
@ -212,9 +213,11 @@ abstract contract InstaLiteConnector is Events, Basic {
|
||||||
address(this)
|
address(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
_astethAmt = astethToken.balanceOf(address(this)) -
|
_astethAmt =
|
||||||
|
astethToken.balanceOf(address(this)) -
|
||||||
initialBalAsteth;
|
initialBalAsteth;
|
||||||
_tokenAmt = tokenContract.balanceOf(address(this)) -
|
_tokenAmt =
|
||||||
|
tokenContract.balanceOf(address(this)) -
|
||||||
initialBalToken;
|
initialBalToken;
|
||||||
require(_deleverageAmt <= (1e9 + _astethAmt), "lack-of-steth");
|
require(_deleverageAmt <= (1e9 + _astethAmt), "lack-of-steth");
|
||||||
|
|
||||||
|
@ -229,10 +232,10 @@ abstract contract InstaLiteConnector is Events, Basic {
|
||||||
vaultAddr,
|
vaultAddr,
|
||||||
_deleverageAmt,
|
_deleverageAmt,
|
||||||
_withdrawAmount,
|
_withdrawAmount,
|
||||||
_astethAmt;
|
_astethAmt,
|
||||||
_ethAmt;
|
_ethAmt,
|
||||||
_stethAmt;
|
_stethAmt,
|
||||||
_tokenAmt;
|
_tokenAmt,
|
||||||
getIds,
|
getIds,
|
||||||
setIds
|
setIds
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user