aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 03:47:24 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 03:47:24 +0800
commit9be4c4749935a765cbd55783735d1d1f719322c0 (patch)
tree49c3f3f42e58b49547799e6dfadc1b10c82381db /packages/instant/src/containers
parent9512978de9aee1953930d4f16a105ec5ef7f048e (diff)
parentaf91a56a5594d07d7da6caaeff79f5a7fb31ff98 (diff)
downloaddexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.gz
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.bz2
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.lz
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.xz
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.zst
dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.zip
Merge branch 'development' into feature/not-enough-eth
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/selected_erc20_asset_amount_input.ts (renamed from packages/instant/src/containers/selected_asset_amount_input.ts)30
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
index 504f51535..67c3ce6a5 100644
--- a/packages/instant/src/containers/selected_asset_amount_input.ts
+++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
@@ -10,39 +10,39 @@ import { Dispatch } from 'redux';
import { Action, actions } from '../redux/actions';
import { State } from '../redux/reducer';
import { ColorOption } from '../style/theme';
-import { ERC20Asset, OrderProcessState, ZeroExInstantError } from '../types';
import { getBestAddress } from '../util/address';
+import { BigNumberInput } from '../util/big_number_input';
import { errorUtil } from '../util/error';
import { web3Wrapper } from '../util/web3_wrapper';
-import { AssetAmountInput } from '../components/asset_amount_input';
+import { ERC20AssetAmountInput } from '../components/erc20_asset_amount_input';
-import { ETH_DECIMALS } from '../constants';
+import { ERC20Asset, OrderProcessState, ZeroExInstantError } from '../types';
-export interface SelectedAssetAmountInputProps {
+export interface SelectedERC20AssetAmountInputProps {
fontColor?: ColorOption;
- fontSize?: string;
+ startingFontSizePx: number;
}
interface ConnectedState {
assetBuyer?: AssetBuyer;
- value?: BigNumber;
+ value?: BigNumberInput;
asset?: ERC20Asset;
}
interface ConnectedDispatch {
- updateBuyQuote: (assetBuyer?: AssetBuyer, value?: BigNumber, asset?: ERC20Asset) => void;
+ updateBuyQuote: (assetBuyer?: AssetBuyer, value?: BigNumberInput, asset?: ERC20Asset) => void;
}
interface ConnectedProps {
- value?: BigNumber;
+ value?: BigNumberInput;
asset?: ERC20Asset;
- onChange: (value?: BigNumber, asset?: ERC20Asset) => void;
+ onChange: (value?: BigNumberInput, asset?: ERC20Asset) => void;
}
-type FinalProps = ConnectedProps & SelectedAssetAmountInputProps;
+type FinalProps = ConnectedProps & SelectedERC20AssetAmountInputProps;
-const mapStateToProps = (state: State, _ownProps: SelectedAssetAmountInputProps): ConnectedState => {
+const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputProps): ConnectedState => {
const selectedAsset = state.selectedAsset;
if (_.isUndefined(selectedAsset) || selectedAsset.metaData.assetProxyId !== AssetProxyId.ERC20) {
return {
@@ -94,7 +94,7 @@ const debouncedUpdateBuyQuoteAsync = _.debounce(updateBuyQuoteAsync, 200, { trai
const mapDispatchToProps = (
dispatch: Dispatch<Action>,
- _ownProps: SelectedAssetAmountInputProps,
+ _ownProps: SelectedERC20AssetAmountInputProps,
): ConnectedDispatch => ({
updateBuyQuote: (assetBuyer, value, asset) => {
// Update the input
@@ -116,7 +116,7 @@ const mapDispatchToProps = (
const mergeProps = (
connectedState: ConnectedState,
connectedDispatch: ConnectedDispatch,
- ownProps: SelectedAssetAmountInputProps,
+ ownProps: SelectedERC20AssetAmountInputProps,
): FinalProps => {
return {
...ownProps,
@@ -128,8 +128,8 @@ const mergeProps = (
};
};
-export const SelectedAssetAmountInput: React.ComponentClass<SelectedAssetAmountInputProps> = connect(
+export const SelectedERC20AssetAmountInput: React.ComponentClass<SelectedERC20AssetAmountInputProps> = connect(
mapStateToProps,
mapDispatchToProps,
mergeProps,
-)(AssetAmountInput);
+)(ERC20AssetAmountInput);