mirror of
https://github.com/Instadapp/dsa-connectors-2.0.git
synced 2024-07-29 21:57:39 +00:00
feat: add prettier
This commit is contained in:
parent
cf32e436f1
commit
1e4a1d9574
|
|
@ -1,6 +1,5 @@
|
||||||
//SPDX-License-Identifier: MIT
|
//SPDX-License-Identifier: MIT
|
||||||
pragma solidity ^0.8.2;
|
pragma solidity ^0.8.2;
|
||||||
pragma experimental ABIEncoderV2;
|
|
||||||
import {MarketParams} from "./interfaces/IMorpho.sol";
|
import {MarketParams} from "./interfaces/IMorpho.sol";
|
||||||
|
|
||||||
contract Events {
|
contract Events {
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,7 @@ abstract contract Helpers is Stores, Basic {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform conversion if necessary
|
// Perform conversion if necessary
|
||||||
convertEthToWeth(
|
convertEthToWeth(true, TokenInterface(_marketParams.loanToken), _amt);
|
||||||
true,
|
|
||||||
TokenInterface(_marketParams.loanToken),
|
|
||||||
_amt
|
|
||||||
);
|
|
||||||
|
|
||||||
return (_marketParams, _amt);
|
return (_marketParams, _amt);
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +100,12 @@ abstract contract Helpers is Stores, Basic {
|
||||||
_assets = _maxAvailable;
|
_assets = _maxAvailable;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(uint256 totalSupplyAssets, uint256 totalSupplyShares, , ) = MORPHO_BLUE.expectedMarketBalances(_marketParams);
|
(
|
||||||
|
uint256 totalSupplyAssets,
|
||||||
|
uint256 totalSupplyShares,
|
||||||
|
,
|
||||||
|
|
||||||
|
) = MORPHO_BLUE.expectedMarketBalances(_marketParams);
|
||||||
|
|
||||||
_assets = _toAssetsUp(
|
_assets = _toAssetsUp(
|
||||||
_shareAmt,
|
_shareAmt,
|
||||||
|
|
@ -132,13 +133,10 @@ abstract contract Helpers is Stores, Basic {
|
||||||
|
|
||||||
uint256 _shareAmt = MORPHO_BLUE.position(_id, _onBehalf).supplyShares;
|
uint256 _shareAmt = MORPHO_BLUE.position(_id, _onBehalf).supplyShares;
|
||||||
|
|
||||||
(uint256 totalSupplyAssets, uint256 totalSupplyShares, , ) = MORPHO_BLUE.expectedMarketBalances(_marketParams);
|
(uint256 totalSupplyAssets, uint256 totalSupplyShares, , ) = MORPHO_BLUE
|
||||||
|
.expectedMarketBalances(_marketParams);
|
||||||
|
|
||||||
_assets = _toAssetsUp(
|
_assets = _toAssetsUp(_shareAmt, totalSupplyAssets, totalSupplyShares);
|
||||||
_shareAmt,
|
|
||||||
totalSupplyAssets,
|
|
||||||
totalSupplyShares
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Calculates the value of `shares` quoted in assets, rounding up.
|
/// @notice Calculates the value of `shares` quoted in assets, rounding up.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user