address comments

This commit is contained in:
Daniel Ternyak 2017-06-24 15:39:03 -05:00
parent 738606bdf0
commit dab75a48b0
5 changed files with 25 additions and 31 deletions

View File

@ -31,9 +31,9 @@ class CoinTypeDropDown extends Component {
} }
} }
export default class WantToSwapMy extends Component { export default class CurrencySwap extends Component {
constructor(props, context) { constructor(props) {
super(props, context); super(props);
} }
static propTypes = { static propTypes = {

View File

@ -49,12 +49,10 @@ export default class CurrentRates extends Component {
name="ETHBTCAmount" name="ETHBTCAmount"
/> />
<span> <span>
ETH ={' '} {` ETH = ${toFixedIfLarger(
{toFixedIfLarger(
this.state.ETHBTCAmount * this.props.ETHBTC, this.state.ETHBTCAmount * this.props.ETHBTC,
6 6
)}{' '} )} BTC`}
BTC
</span> </span>
</p> </p>
<p className="mono"> <p className="mono">
@ -65,12 +63,10 @@ export default class CurrentRates extends Component {
name="ETHREPAmount" name="ETHREPAmount"
/> />
<span> <span>
ETH ={' '} {` ETH = ${toFixedIfLarger(
{toFixedIfLarger(
this.state.ETHREPAmount * this.props.ETHREP, this.state.ETHREPAmount * this.props.ETHREP,
6 6
)}{' '} )} REP`}
REP
</span> </span>
</p> </p>
</div> </div>
@ -83,12 +79,10 @@ export default class CurrentRates extends Component {
name="BTCETHAmount" name="BTCETHAmount"
/> />
<span> <span>
BTC ={' '} {` BTC = ${toFixedIfLarger(
{toFixedIfLarger(
this.state.BTCETHAmount * this.props.BTCETH, this.state.BTCETHAmount * this.props.BTCETH,
6 6
)}{' '} )} ETH`}
ETH
</span> </span>
</p> </p>
<p className="mono"> <p className="mono">
@ -99,12 +93,10 @@ export default class CurrentRates extends Component {
name="BTCREPAmount" name="BTCREPAmount"
/> />
<span> <span>
BTC ={' '} {` BTC = ${toFixedIfLarger(
{toFixedIfLarger(
this.state.BTCREPAmount * this.props.BTCREP, this.state.BTCREPAmount * this.props.BTCREP,
6 6
)}{' '} )} REP`}
REP
</span> </span>
</p> </p>
</div> </div>

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { DONATION_ADDRESSES_MAP } from 'config/data'; import { DONATION_ADDRESSES_MAP } from 'config/data';
import Validator from 'libs/validator'; import Validator from 'libs/validator';
export default class YourReceiving extends Component { export default class ReceivingAddress extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.validator = new Validator(); this.validator = new Validator();

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { toFixedIfLarger } from 'utils/formatters'; import { toFixedIfLarger } from 'utils/formatters';
export default class YourInformation extends Component { export default class SwapInformation extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
} }
@ -50,20 +50,22 @@ export default class YourInformation extends Component {
<section className="order-info-wrap row"> <section className="order-info-wrap row">
<div className="col-sm-4 order-info"> <div className="col-sm-4 order-info">
<h4> <h4>
{' '}{toFixedIfLarger(originAmount, 6)} {originKind}{' '} {` ${toFixedIfLarger(originAmount, 6)} ${originKind}`}
</h4> </h4>
<p>Amount to send</p> <p>Amount to send</p>
</div> </div>
<div className="col-sm-4 order-info"> <div className="col-sm-4 order-info">
<h4> <h4>
{' '}{toFixedIfLarger(destinationAmount, 6)} {destinationKind}{' '} {` ${toFixedIfLarger(destinationAmount, 6)} ${destinationKind}`}
</h4> </h4>
<p>Amount to receive</p> <p>Amount to receive</p>
</div> </div>
<div className="col-sm-4 order-info"> <div className="col-sm-4 order-info">
<h4> <h4>
{' '}{toFixedIfLarger(this.computedOriginDestinationRatio(), 6)}{' '} {` ${toFixedIfLarger(
{originKind}/{destinationKind}{' '} this.computedOriginDestinationRatio(),
6
)} ${originKind}/${destinationKind} `}
</h4> </h4>
<p>Your rate</p> <p>Your rate</p>
</div> </div>

View File

@ -1,8 +1,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import WantToSwapMy from './components/wantToSwapMy'; import CurrencySwap from './components/currencySwap';
import YourInformation from './components/yourInformation'; import SwapInformation from './components/swapInformation';
import CurrentRates from './components/currentRates'; import CurrentRates from './components/currentRates';
import YourReceiving from './components/yourReceiving'; import ReceivingAddress from './components/receivingAddress';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import * as swapActions from 'actions/swap'; import * as swapActions from 'actions/swap';
@ -104,12 +104,12 @@ class Swap extends Component {
{!partOneComplete && {!partOneComplete &&
<div> <div>
<CurrentRates {...bityRates} /> <CurrentRates {...bityRates} />
<WantToSwapMy {...wantToSwapMyProps} /> <CurrencySwap {...wantToSwapMyProps} />
</div>} </div>}
{partOneComplete && {partOneComplete &&
<div> <div>
<YourInformation {...yourInformationProps} /> <SwapInformation {...yourInformationProps} />
<YourReceiving {...yourReceivingProps} /> <ReceivingAddress {...yourReceivingProps} />
</div>} </div>}
</main> </main>
</div> </div>