(deposit) bug fix - removed msg.value == _amt

This commit is contained in:
Samyak Jain 2020-05-23 20:50:59 +10:00
parent 0fd86b7e6d
commit ff390f88fc

View File

@ -96,7 +96,6 @@ contract BasicResolver is AaveHelpers {
uint ethAmt;
if (token == getEthAddr()) {
require(_amt == msg.value, "not-enought-eth");
_amt = _amt == uint(-1) ? address(this).balance : _amt;
ethAmt = _amt;
} else {
@ -107,9 +106,9 @@ contract BasicResolver is AaveHelpers {
}
aave.deposit.value(ethAmt)(token, _amt, 0); // TODO - need to set referralCode;
if (!getIsColl(aave, token)) aave.setUserUseReserveAsCollateral(token, true);
setUint(setId, _amt);
emit LogDeposit(token, _amt, getId, setId);