mirror of
https://github.com/Instadapp/dsa-connectors-2.0.git
synced 2024-07-29 21:57:39 +00:00
feat: remove buffer wei
This commit is contained in:
parent
cd5aa7ccf8
commit
e3b5622c9a
|
@ -775,13 +775,13 @@ abstract contract MorphoBlue is Helpers, Events {
|
||||||
convertEthToWeth(
|
convertEthToWeth(
|
||||||
_isEth,
|
_isEth,
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
_amt + 1 // Adding 1 wei as a buffer
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
approve(
|
approve(
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
address(MORPHO_BLUE),
|
address(MORPHO_BLUE),
|
||||||
_amt + 1
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_isMax && _amt < _maxDsaBalance) {
|
if (_isMax && _amt < _maxDsaBalance) {
|
||||||
|
@ -857,13 +857,13 @@ abstract contract MorphoBlue is Helpers, Events {
|
||||||
convertEthToWeth(
|
convertEthToWeth(
|
||||||
_isEth,
|
_isEth,
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
_amt + 1 // Adding 1 wei as buffer
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
approve(
|
approve(
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
address(MORPHO_BLUE),
|
address(MORPHO_BLUE),
|
||||||
_amt + 1
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_amt == type(uint256).max && _amt < _maxDsaBalance) {
|
if (_amt == type(uint256).max && _amt < _maxDsaBalance) {
|
||||||
|
@ -954,13 +954,13 @@ abstract contract MorphoBlue is Helpers, Events {
|
||||||
convertEthToWeth(
|
convertEthToWeth(
|
||||||
_isEth,
|
_isEth,
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
_amt + 1
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
approve(
|
approve(
|
||||||
TokenInterface(_marketParams.loanToken),
|
TokenInterface(_marketParams.loanToken),
|
||||||
address(MORPHO_BLUE),
|
address(MORPHO_BLUE),
|
||||||
_amt + 1
|
_amt
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_shareAmt == type(uint256).max && _amt < _maxDsaBalance) {
|
if (_shareAmt == type(uint256).max && _amt < _maxDsaBalance) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user