From eb3eb30fb264c18f63f14230a01b3a47723ef3e9 Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Thu, 21 May 2020 16:20:08 +0530 Subject: [PATCH] fixed oasis sellAmount function --- contracts/protocols/oasis.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/protocols/oasis.sol b/contracts/protocols/oasis.sol index cf17f22..553ac3c 100644 --- a/contracts/protocols/oasis.sol +++ b/contracts/protocols/oasis.sol @@ -117,7 +117,7 @@ contract Resolver is OasisHelpers { function getSellAmount(address buyAddr, address sellAddr, uint buyAmt, uint slippage) public view returns (uint sellAmt, uint unitAmt) { (TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr); sellAmt = OasisInterface(getOasisAddr()).getPayAmount(address(_sellAddr), address(_buyAddr), buyAmt); - unitAmt = getBuyUnitAmt(_sellAddr, sellAmt, _buyAddr, buyAmt, slippage); + unitAmt = getSellUnitAmt(_sellAddr, sellAmt, _buyAddr, buyAmt, slippage); } function getMinSellAmount(address sellAddr) public view returns (uint minAmt) {