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 {
constructor(props, context) {
super(props, context);
export default class CurrencySwap extends Component {
constructor(props) {
super(props);
}
static propTypes = {

View File

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

View File

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

View File

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

View File

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