Normalize remove liquidity exchange rate

This commit is contained in:
Kenny Tran 2018-11-12 12:55:46 -08:00
parent f87aa671a3
commit 207df31154

@ -198,7 +198,7 @@ class RemoveLiquidity extends Component {
const ownership = liquidityBalance.dividedBy(totalSupply);
const ethPer = ethReserve.dividedBy(totalSupply);
const tokenPer = tokenReserve.dividedBy(totalSupply);
const exchangeRate = tokenReserve.div(ethReserve);
const exchangeRate = tokenReserve.multipliedBy(10 ** (18 - tokenDecimals)).div(ethReserve);
const ownedEth = ethPer.multipliedBy(liquidityBalance).dividedBy(10 ** 18);
const ownedToken = tokenPer.multipliedBy(liquidityBalance).dividedBy(10 ** tokenDecimals);