mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: remove comments, lint, add bytes32 to string function
This commit is contained in:
parent
8a57656668
commit
af835f5fd1
|
@ -109,7 +109,6 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
|
||||||
reserveData.totalScaledVariableDebt = IVariableDebtToken(reserveData.variableDebtTokenAddress)
|
reserveData.totalScaledVariableDebt = IVariableDebtToken(reserveData.variableDebtTokenAddress)
|
||||||
.scaledTotalSupply();
|
.scaledTotalSupply();
|
||||||
|
|
||||||
// we're getting this info from the aToken, because some of assets can be not compliant with ETC20Detailed
|
|
||||||
if (address(reserveData.underlyingAsset) == address(MKRAddress)) {
|
if (address(reserveData.underlyingAsset) == address(MKRAddress)) {
|
||||||
bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol();
|
bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol();
|
||||||
reserveData.symbol = bytes32ToString(symbol);
|
reserveData.symbol = bytes32ToString(symbol);
|
||||||
|
@ -117,18 +116,6 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
|
||||||
reserveData.symbol = IERC20Detailed(reserveData.underlyingAsset).symbol();
|
reserveData.symbol = IERC20Detailed(reserveData.underlyingAsset).symbol();
|
||||||
}
|
}
|
||||||
|
|
||||||
// (bool success, bytes memory result) = reserveData.underlyingAsset.staticcall(abi.encodeWithSignature("symbol()"));
|
|
||||||
// reserveData.symbol = string(abi.encodePacked(result));
|
|
||||||
|
|
||||||
// try IERC20Detailed(reserveData.underlyingAsset).symbol() returns (string memory symbol) {
|
|
||||||
// reserveData.symbol = symbol;
|
|
||||||
// } catch (bytes memory /*lowLevelData*/) {
|
|
||||||
// bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol();
|
|
||||||
// reserveData.symbol = string(abi.encodePacked(symbol));
|
|
||||||
// }
|
|
||||||
// reserveData.symbol = IERC20Detailed(reserveData.underlyingAsset).symbol();
|
|
||||||
reserveData.name = '';
|
|
||||||
|
|
||||||
(
|
(
|
||||||
reserveData.baseLTVasCollateral,
|
reserveData.baseLTVasCollateral,
|
||||||
reserveData.reserveLiquidationThreshold,
|
reserveData.reserveLiquidationThreshold,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user