aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/amount_input.tsx6
-rw-r--r--packages/instant/src/components/instant_heading.tsx1
-rw-r--r--packages/instant/src/components/ui/input.tsx2
-rw-r--r--packages/instant/src/components/zero_ex_instant_container.tsx2
-rw-r--r--packages/instant/src/containers/selected_asset_amount_input.tsx10
5 files changed, 9 insertions, 12 deletions
diff --git a/packages/instant/src/components/amount_input.tsx b/packages/instant/src/components/amount_input.tsx
index 8fead78ca..2b64469f6 100644
--- a/packages/instant/src/components/amount_input.tsx
+++ b/packages/instant/src/components/amount_input.tsx
@@ -4,7 +4,7 @@ import * as React from 'react';
import { ColorOption } from '../style/theme';
-import { Container, Flex, Input, Text } from './ui';
+import { Container, Input } from './ui';
export interface AmountInputProps {
fontColor?: ColorOption;
@@ -29,10 +29,10 @@ export class AmountInput extends React.Component<AmountInputProps> {
</Container>
);
}
- private _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
+ private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
const bigNumberValue = new BigNumber(event.target.value);
if (!_.isUndefined(this.props.onChange)) {
this.props.onChange(bigNumberValue);
}
- };
+ }
}
diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx
index 2b07ef666..be0414b8d 100644
--- a/packages/instant/src/components/instant_heading.tsx
+++ b/packages/instant/src/components/instant_heading.tsx
@@ -1,4 +1,3 @@
-import { BigNumber } from '@0xproject/utils';
import * as React from 'react';
import { SelectedAssetAmountInput } from '../containers/selected_asset_amount_input';
diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx
index fc4fed14e..f8c6b6ef6 100644
--- a/packages/instant/src/components/ui/input.tsx
+++ b/packages/instant/src/components/ui/input.tsx
@@ -2,8 +2,6 @@ import * as React from 'react';
import { ColorOption, styled } from '../../style/theme';
-import { Container, Flex, Text } from '../ui';
-
export interface InputProps {
className?: string;
value?: string;
diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx
index 6075a5b21..716227b51 100644
--- a/packages/instant/src/components/zero_ex_instant_container.tsx
+++ b/packages/instant/src/components/zero_ex_instant_container.tsx
@@ -5,7 +5,7 @@ import { ColorOption } from '../style/theme';
import { BuyButton } from './buy_button';
import { InstantHeading } from './instant_heading';
import { OrderDetails } from './order_details';
-import { Container, Flex, Text } from './ui';
+import { Container, Flex } from './ui';
export interface ZeroExInstantContainerProps {}
diff --git a/packages/instant/src/containers/selected_asset_amount_input.tsx b/packages/instant/src/containers/selected_asset_amount_input.tsx
index f5e1e134a..818caa965 100644
--- a/packages/instant/src/containers/selected_asset_amount_input.tsx
+++ b/packages/instant/src/containers/selected_asset_amount_input.tsx
@@ -1,5 +1,4 @@
import { BigNumber } from '@0xproject/utils';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as React from 'react';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
@@ -8,7 +7,7 @@ import { State } from '../redux/reducer';
import { ColorOption } from '../style/theme';
import { Action, ActionTypes } from '../types';
-import { AmountInput, AmountInputProps } from '../components/amount_input';
+import { AmountInput } from '../components/amount_input';
export interface SelectedAssetAmountInputProps {
fontColor?: ColorOption;
@@ -31,6 +30,7 @@ const mapDispatchToProps = (dispatch: Dispatch<Action>): ConnectedDispatch => ({
onChange: value => dispatch({ type: ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, data: value }),
});
-export const SelectedAssetAmountInput: React.ComponentClass<SelectedAssetAmountInputProps> = connect(mapStateToProps)(
- AmountInput,
-);
+export const SelectedAssetAmountInput: React.ComponentClass<SelectedAssetAmountInputProps> = connect(
+ mapStateToProps,
+ mapDispatchToProps,
+)(AmountInput);