2017-09-25 02:06:28 +00:00
|
|
|
import { TShowNotification } from 'actions/notifications';
|
|
|
|
import {
|
|
|
|
TChangeStepSwap,
|
|
|
|
TDestinationAmountSwap,
|
|
|
|
TDestinationKindSwap,
|
|
|
|
TOriginAmountSwap,
|
|
|
|
TOriginKindSwap
|
|
|
|
} from 'actions/swap';
|
|
|
|
import SimpleButton from 'components/ui/SimpleButton';
|
|
|
|
import SimpleSelect from 'components/ui/SimpleSelect';
|
|
|
|
import bityConfig, { generateKindMax, generateKindMin } from 'config/bity';
|
2017-07-31 23:14:30 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import translate from 'translations';
|
2017-09-25 02:06:28 +00:00
|
|
|
import { combineAndUpper, toFixedIfLarger } from 'utils/formatters';
|
|
|
|
import './CurrencySwap.scss';
|
|
|
|
|
|
|
|
export interface StateProps {
|
|
|
|
bityRates: any;
|
|
|
|
originAmount: number | null;
|
|
|
|
destinationAmount: number | null;
|
|
|
|
originKind: string;
|
|
|
|
destinationKind: string;
|
|
|
|
destinationKindOptions: string[];
|
|
|
|
originKindOptions: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ActionProps {
|
|
|
|
showNotification: TShowNotification;
|
|
|
|
changeStepSwap: TChangeStepSwap;
|
|
|
|
originKindSwap: TOriginKindSwap;
|
|
|
|
destinationKindSwap: TDestinationKindSwap;
|
|
|
|
originAmountSwap: TOriginAmountSwap;
|
|
|
|
destinationAmountSwap: TDestinationAmountSwap;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface State {
|
|
|
|
disabled: boolean;
|
2017-09-25 03:29:49 +00:00
|
|
|
showedMinMaxError: boolean;
|
2017-09-25 02:06:28 +00:00
|
|
|
}
|
2017-09-25 03:29:49 +00:00
|
|
|
|
|
|
|
export default class CurrencySwap extends Component<
|
|
|
|
StateProps & ActionProps,
|
|
|
|
State
|
|
|
|
> {
|
2017-09-25 02:06:28 +00:00
|
|
|
public state = {
|
2017-07-31 23:14:30 +00:00
|
|
|
disabled: true,
|
|
|
|
showedMinMaxError: false
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public isMinMaxValid = (amount, kind) => {
|
2017-07-31 23:14:30 +00:00
|
|
|
let bityMin;
|
|
|
|
let bityMax;
|
|
|
|
if (kind !== 'BTC') {
|
|
|
|
const bityPairRate = this.props.bityRates['BTC' + kind];
|
2017-09-25 02:06:28 +00:00
|
|
|
bityMin = generateKindMin(bityPairRate, kind);
|
|
|
|
bityMax = generateKindMax(bityPairRate, kind);
|
2017-07-31 23:14:30 +00:00
|
|
|
} else {
|
|
|
|
bityMin = bityConfig.BTCMin;
|
|
|
|
bityMax = bityConfig.BTCMax;
|
|
|
|
}
|
2017-09-25 02:06:28 +00:00
|
|
|
const higherThanMin = amount >= bityMin;
|
|
|
|
const lowerThanMax = amount <= bityMax;
|
2017-07-31 23:14:30 +00:00
|
|
|
return higherThanMin && lowerThanMax;
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public isDisabled = (originAmount, originKind, destinationAmount) => {
|
2017-07-31 23:14:30 +00:00
|
|
|
const hasOriginAmountAndDestinationAmount =
|
|
|
|
originAmount && destinationAmount;
|
|
|
|
const minMaxIsValid = this.isMinMaxValid(originAmount, originKind);
|
|
|
|
return !(hasOriginAmountAndDestinationAmount && minMaxIsValid);
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public setDisabled(originAmount, originKind, destinationAmount) {
|
2017-07-31 23:14:30 +00:00
|
|
|
const disabled = this.isDisabled(
|
|
|
|
originAmount,
|
|
|
|
originKind,
|
|
|
|
destinationAmount
|
|
|
|
);
|
|
|
|
|
|
|
|
if (disabled && originAmount && !this.state.showedMinMaxError) {
|
|
|
|
const { bityRates } = this.props;
|
2017-09-25 02:06:28 +00:00
|
|
|
const ETHMin = generateKindMin(bityRates.BTCETH, 'ETH');
|
|
|
|
const ETHMax = generateKindMax(bityRates.BTCETH, 'ETH');
|
|
|
|
const REPMin = generateKindMin(bityRates.BTCREP, 'REP');
|
2017-07-31 23:14:30 +00:00
|
|
|
|
|
|
|
const notificationMessage = `
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
Minimum amount ${bityConfig.BTCMin} BTC,
|
|
|
|
${toFixedIfLarger(ETHMin, 3)} ETH.
|
|
|
|
Max amount ${bityConfig.BTCMax} BTC,
|
|
|
|
${toFixedIfLarger(ETHMax, 3)} ETH, or
|
2017-07-31 23:14:30 +00:00
|
|
|
${toFixedIfLarger(REPMin, 3)} REP
|
|
|
|
`;
|
|
|
|
|
|
|
|
this.setState(
|
|
|
|
{
|
2017-09-25 02:06:28 +00:00
|
|
|
disabled,
|
2017-07-31 23:14:30 +00:00
|
|
|
showedMinMaxError: true
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
this.props.showNotification('danger', notificationMessage, 10000);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
this.setState({
|
2017-09-25 02:06:28 +00:00
|
|
|
disabled
|
2017-07-31 23:14:30 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public onClickStartSwap = () => {
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.changeStepSwap(2);
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public setOriginAndDestinationToNull = () => {
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.originAmountSwap(null);
|
|
|
|
this.props.destinationAmountSwap(null);
|
|
|
|
this.setDisabled(null, this.props.originKind, null);
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public onChangeOriginAmount = (
|
|
|
|
event: React.SyntheticEvent<HTMLInputElement>
|
|
|
|
) => {
|
2017-07-31 23:14:30 +00:00
|
|
|
const { destinationKind, originKind } = this.props;
|
2017-09-25 02:06:28 +00:00
|
|
|
const amount = (event.target as HTMLInputElement).value;
|
|
|
|
const originAmountAsNumber = parseFloat(amount);
|
2017-07-31 23:14:30 +00:00
|
|
|
if (originAmountAsNumber || originAmountAsNumber === 0) {
|
2017-09-25 02:06:28 +00:00
|
|
|
const pairName = combineAndUpper(originKind, destinationKind);
|
|
|
|
const bityRate = this.props.bityRates[pairName];
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.originAmountSwap(originAmountAsNumber);
|
2017-09-25 02:06:28 +00:00
|
|
|
const destinationAmount = originAmountAsNumber * bityRate;
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.destinationAmountSwap(destinationAmount);
|
|
|
|
this.setDisabled(originAmountAsNumber, originKind, destinationAmount);
|
|
|
|
} else {
|
|
|
|
this.setOriginAndDestinationToNull();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public onChangeDestinationAmount = (
|
|
|
|
event: React.SyntheticEvent<HTMLInputElement>
|
|
|
|
) => {
|
2017-07-31 23:14:30 +00:00
|
|
|
const { destinationKind, originKind } = this.props;
|
2017-09-25 02:06:28 +00:00
|
|
|
const amount = (event.target as HTMLInputElement).value;
|
|
|
|
const destinationAmountAsNumber = parseFloat(amount);
|
2017-07-31 23:14:30 +00:00
|
|
|
if (destinationAmountAsNumber || destinationAmountAsNumber === 0) {
|
|
|
|
this.props.destinationAmountSwap(destinationAmountAsNumber);
|
2017-09-25 02:06:28 +00:00
|
|
|
const pairNameReversed = combineAndUpper(destinationKind, originKind);
|
|
|
|
const bityRate = this.props.bityRates[pairNameReversed];
|
|
|
|
const originAmount = destinationAmountAsNumber * bityRate;
|
|
|
|
this.props.originAmountSwap(originAmount);
|
2017-07-31 23:14:30 +00:00
|
|
|
this.setDisabled(originAmount, originKind, destinationAmountAsNumber);
|
|
|
|
} else {
|
|
|
|
this.setOriginAndDestinationToNull();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public onChangeDestinationKind = (
|
|
|
|
event: React.SyntheticEvent<HTMLInputElement>
|
|
|
|
) => {
|
|
|
|
const newDestinationKind = (event.target as HTMLInputElement).value;
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.destinationKindSwap(newDestinationKind);
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public onChangeOriginKind = (
|
|
|
|
event: React.SyntheticEvent<HTMLInputElement>
|
|
|
|
) => {
|
|
|
|
const newOriginKind = (event.target as HTMLInputElement).value;
|
2017-07-31 23:14:30 +00:00
|
|
|
this.props.originKindSwap(newOriginKind);
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public render() {
|
2017-07-31 23:14:30 +00:00
|
|
|
const {
|
|
|
|
originAmount,
|
|
|
|
destinationAmount,
|
|
|
|
originKind,
|
|
|
|
destinationKind,
|
|
|
|
destinationKindOptions,
|
|
|
|
originKindOptions
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
return (
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
<article className="CurrencySwap">
|
2017-09-25 02:06:28 +00:00
|
|
|
<h1 className="CurrencySwap-title">{translate('SWAP_init_1')}</h1>
|
2017-07-31 23:14:30 +00:00
|
|
|
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
<div className="form-inline">
|
|
|
|
<input
|
2017-09-25 02:06:28 +00:00
|
|
|
className={`CurrencySwap-input form-control ${String(
|
|
|
|
originAmount
|
|
|
|
) !== '' && this.isMinMaxValid(originAmount, originKind)
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
? 'is-valid'
|
|
|
|
: 'is-invalid'}`}
|
|
|
|
type="number"
|
|
|
|
placeholder="Amount"
|
2017-09-25 03:29:49 +00:00
|
|
|
value={originAmount || originAmount === 0 ? originAmount : ''}
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
onChange={this.onChangeOriginAmount}
|
|
|
|
/>
|
|
|
|
|
2017-09-07 20:14:52 +00:00
|
|
|
<SimpleSelect
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
value={originKind}
|
2017-09-25 02:06:28 +00:00
|
|
|
onChange={this.onChangeOriginKind}
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
options={originKindOptions}
|
|
|
|
/>
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
<h1 className="CurrencySwap-divider">{translate('SWAP_init_2')}</h1>
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
|
|
|
|
<input
|
2017-09-25 02:06:28 +00:00
|
|
|
className={`CurrencySwap-input form-control ${String(
|
|
|
|
destinationAmount
|
|
|
|
) !== '' && this.isMinMaxValid(originAmount, originKind)
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
? 'is-valid'
|
|
|
|
: 'is-invalid'}`}
|
|
|
|
type="number"
|
|
|
|
placeholder="Amount"
|
2017-09-25 03:29:49 +00:00
|
|
|
value={
|
|
|
|
destinationAmount || destinationAmount === 0
|
|
|
|
? destinationAmount
|
|
|
|
: ''
|
|
|
|
}
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
onChange={this.onChangeDestinationAmount}
|
|
|
|
/>
|
|
|
|
|
2017-09-07 20:14:52 +00:00
|
|
|
<SimpleSelect
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
value={destinationKind}
|
|
|
|
onChange={this.onChangeDestinationKind}
|
|
|
|
options={destinationKindOptions}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="CurrencySwap-submit">
|
2017-07-31 23:14:30 +00:00
|
|
|
<SimpleButton
|
|
|
|
onClick={this.onClickStartSwap}
|
|
|
|
text={translate('SWAP_init_CTA')}
|
|
|
|
disabled={this.state.disabled}
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
type="info"
|
2017-07-31 23:14:30 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|