diff options
Diffstat (limited to 'packages/website/ts/containers/inputs')
-rw-r--r-- | packages/website/ts/containers/inputs/allowance_state_toggle.ts | 42 | ||||
-rw-r--r-- | packages/website/ts/containers/inputs/eth_amount_input.ts | 36 |
2 files changed, 0 insertions, 78 deletions
diff --git a/packages/website/ts/containers/inputs/allowance_state_toggle.ts b/packages/website/ts/containers/inputs/allowance_state_toggle.ts deleted file mode 100644 index 70712685e..000000000 --- a/packages/website/ts/containers/inputs/allowance_state_toggle.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from 'react'; -import { connect } from 'react-redux'; -import { Dispatch } from 'redux'; -import { Blockchain } from 'ts/blockchain'; -import { PointerDirection } from 'ts/components/ui/pointer'; -import { State } from 'ts/redux/reducer'; -import { BalanceErrs, Token, TokenState } from 'ts/types'; - -import { AllowanceStateToggle as AllowanceStateToggleComponent } from 'ts/components/inputs/allowance_state_toggle'; -import { Dispatcher } from 'ts/redux/dispatcher'; - -interface AllowanceStateToggleProps { - blockchain: Blockchain; - onErrorOccurred?: (errType: BalanceErrs) => void; - token: Token; - tokenState: TokenState; - refetchTokenStateAsync: () => Promise<void>; - tooltipDirection?: PointerDirection; -} - -interface ConnectedState { - networkId: number; - userAddress: string; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: AllowanceStateToggleProps): ConnectedState => ({ - networkId: state.networkId, - userAddress: state.userAddress, -}); - -const mapDispatchTopProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); - -export const AllowanceStateToggle: React.ComponentClass<AllowanceStateToggleProps> = connect( - mapStateToProps, - mapDispatchTopProps, -)(AllowanceStateToggleComponent); diff --git a/packages/website/ts/containers/inputs/eth_amount_input.ts b/packages/website/ts/containers/inputs/eth_amount_input.ts deleted file mode 100644 index 45d3ddebd..000000000 --- a/packages/website/ts/containers/inputs/eth_amount_input.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { BigNumber } from '@0x/utils'; -import { Web3Wrapper } from '@0x/web3-wrapper'; -import * as React from 'react'; -import { connect } from 'react-redux'; -import { State } from 'ts/redux/reducer'; -import { ValidatedBigNumberCallback } from 'ts/types'; -import { constants } from 'ts/utils/constants'; - -import { EthAmountInput as EthAmountInputComponent } from 'ts/components/inputs/eth_amount_input'; - -interface EthAmountInputProps { - label?: string; - amount?: BigNumber; - hintText?: string; - onChange: ValidatedBigNumberCallback; - onErrorMsgChange?: (errorMsg: React.ReactNode) => void; - shouldShowIncompleteErrs: boolean; - shouldCheckBalance: boolean; - shouldShowErrs?: boolean; - shouldShowUnderline?: boolean; - style?: React.CSSProperties; - labelStyle?: React.CSSProperties; - inputHintStyle?: React.CSSProperties; -} - -interface ConnectedState { - balance: BigNumber; -} - -const mapStateToProps = (state: State, _ownProps: EthAmountInputProps): ConnectedState => ({ - balance: Web3Wrapper.toUnitAmount(state.userEtherBalanceInWei, constants.DECIMAL_PLACES_ETH), -}); - -export const EthAmountInput: React.ComponentClass<EthAmountInputProps> = connect(mapStateToProps)( - EthAmountInputComponent, -); |