From d7b6d8222f459942f82338fee752d03fe2d1547a Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 4 Oct 2018 19:32:33 -0700 Subject: Apply linter --- packages/instant/package.json | 1 + packages/instant/src/components/amount_input.tsx | 6 +++--- packages/instant/src/components/instant_heading.tsx | 1 - packages/instant/src/components/ui/input.tsx | 2 -- packages/instant/src/components/zero_ex_instant_container.tsx | 2 +- .../instant/src/containers/selected_asset_amount_input.tsx | 10 +++++----- 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 { ); } - private _handleChange = (event: React.ChangeEvent): void => { + private readonly _handleChange = (event: React.ChangeEvent): 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): ConnectedDispatch => ({ onChange: value => dispatch({ type: ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, data: value }), }); -export const SelectedAssetAmountInput: React.ComponentClass = connect(mapStateToProps)( - AmountInput, -); +export const SelectedAssetAmountInput: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(AmountInput); -- cgit v1.2.3