diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-05 10:32:33 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-05 10:32:33 +0800 |
commit | d7b6d8222f459942f82338fee752d03fe2d1547a (patch) | |
tree | 6f258046460155914886abd68f7059aca7d3a779 /packages/instant | |
parent | 1eb8d17ce36274093583069aab0025768a4a91ce (diff) | |
download | dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar.gz dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar.bz2 dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar.lz dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar.xz dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.tar.zst dexon-sol-tools-d7b6d8222f459942f82338fee752d03fe2d1547a.zip |
Apply linter
Diffstat (limited to 'packages/instant')
6 files changed, 10 insertions, 12 deletions
diff --git a/packages/instant/package.json b/packages/instant/package.json index 949854197..8cac481db 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -43,6 +43,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { + "@0xproject/asset-buyer": "^2.0.0", "@0xproject/types": "^1.1.1", "@0xproject/typescript-typings": "^2.0.2", "@0xproject/utils": "^2.0.2", 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); |