mirror of
				https://github.com/Instadapp/dsa-resolvers-deprecated.git
				synced 2024-07-29 22:38:16 +00:00 
			
		
		
		
	Fixed bug
This commit is contained in:
		
							parent
							
								
									55fc5a573e
								
							
						
					
					
						commit
						53f80a570f
					
				|  | @ -68,6 +68,10 @@ contract KyberHelpers is Helpers { | |||
|         amt = mul(_amt, 10 ** (18 - _dec)); | ||||
|     } | ||||
| 
 | ||||
|     function convert18ToDec(uint _dec, uint256 _amt) internal pure returns (uint256 amt) { | ||||
|         amt = (_amt / 10 ** (18 - _dec)); | ||||
|     } | ||||
| 
 | ||||
|     function getBuyUnitAmt( | ||||
|         address buyAddr, | ||||
|         address sellAddr, | ||||
|  | @ -79,7 +83,7 @@ contract KyberHelpers is Helpers { | |||
|         unitAmt = wmul(expectedRate, sub(WAD, slippage)); | ||||
|         uint _sellAmt = convertTo18(_sellDec, sellAmt); | ||||
|         _buyAmt = wmul(_sellAmt, expectedRate); | ||||
|         _buyAmt = convertTo18(_buyDec, _buyAmt); | ||||
|         _buyAmt = convert18ToDec(_buyDec, _buyAmt); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thrilok Kumar
						Thrilok Kumar