From cd9d36b87f822ccf73f2f1253aef457f29cb1dc8 Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Thu, 21 Jan 2021 23:21:01 +0530 Subject: [PATCH] Minor change --- contracts/protocols/dydx.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/protocols/dydx.sol b/contracts/protocols/dydx.sol index f149aff..784f608 100644 --- a/contracts/protocols/dydx.sol +++ b/contracts/protocols/dydx.sol @@ -121,8 +121,8 @@ contract Helpers is DSMath{ uint ethPrice = solo.getMarketPrice(0).value; tokenData = new TokenData[](marketId.length); for (uint i = 0; i < marketId.length; i++) { - uint decimals = marketId[i] == 0 ? 18 : ERC20Interface(solo.getMarketTokenAddress(marketId[i])).decimals(); - tokenData[i].balance = marketId[i] == 0 ? address(solo).balance : ERC20Interface(solo.getMarketTokenAddress(marketId[i])).balanceOf(address(solo)); + uint decimals = ERC20Interface(solo.getMarketTokenAddress(marketId[i])).decimals(); + tokenData[i].balance = ERC20Interface(solo.getMarketTokenAddress(marketId[i])).balanceOf(address(solo)); uint price = marketId[i] == 1 ? 10 ** 18 : solo.getMarketPrice(marketId[i]).value; tokenData[i].tokenPriceInUsd = price / 10 ** (18 - decimals); tokenData[i].tokenPriceInEth = wdiv(tokenData[i].tokenPriceInUsd, ethPrice);