From 0b775af7a4438126534fd192553f0728416d0604 Mon Sep 17 00:00:00 2001 From: sendra Date: Tue, 2 Nov 2021 15:59:42 +0100 Subject: [PATCH] feat: hardcode maker --- contracts/misc/UiPoolDataProvider.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contracts/misc/UiPoolDataProvider.sol b/contracts/misc/UiPoolDataProvider.sol index ab34d49e..73e32089 100644 --- a/contracts/misc/UiPoolDataProvider.sol +++ b/contracts/misc/UiPoolDataProvider.sol @@ -28,6 +28,7 @@ contract UiPoolDataProvider is IUiPoolDataProvider { IChainlinkAggregator public immutable networkBaseTokenPriceInUsdProxyAggregator; IChainlinkAggregator public immutable marketReferenceCurrencyPriceInUsdProxyAggregator; uint256 public constant ETH_CURRENCY_UNIT = 1 ether; + address public constant MKRAddress = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2; constructor( @@ -112,6 +113,14 @@ contract UiPoolDataProvider is IUiPoolDataProvider { .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)) { + bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol(); + reserveData.symbol = string(abi.encodePacked(symbol)); + } else { + reserveData.symbol = IERC20Detailed(reserveData.underlyingAsset).symbol(); + } + + // (bool success, bytes memory result) = reserveData.underlyingAsset.staticcall(abi.encodeWithSignature("symbol()")); // reserveData.symbol = string(abi.encodePacked(result));