Skip to content

Commit

Permalink
Close 1inch#8. Rate formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
conlan committed Dec 25, 2018
1 parent 360dbad commit fd870a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function GetEthToTokenPrice(ethReserve, tokenReserve) {

var rate = (numerator / denominator);
if (rate > 0) {
return 1 / rate;
return rate;
} else {
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TokenPoolDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TokenPoolDetails extends Component {

var rateDisplay =
this.props.exchangeRate > 0
? this.props.exchangeRate.toFixed(4) + " ETH"
? ("1 ETH = " + this.props.exchangeRate.toFixed(4) + " " + this.props.curExchange)
: "-";

const data = [
Expand Down

0 comments on commit fd870a8

Please sign in to comment.