aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/available_erc20_token_selector.ts
diff options
context:
space:
mode:
authorHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
committerHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
commit7ae38906926dc09bc10670c361af0d2bf0050426 (patch)
tree5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/instant/src/containers/available_erc20_token_selector.ts
parentb5fd3c72a08aaa6957917d74c333387a16edf66b (diff)
downloaddexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip
Update dependency packages
Diffstat (limited to 'packages/instant/src/containers/available_erc20_token_selector.ts')
-rw-r--r--packages/instant/src/containers/available_erc20_token_selector.ts45
1 files changed, 0 insertions, 45 deletions
diff --git a/packages/instant/src/containers/available_erc20_token_selector.ts b/packages/instant/src/containers/available_erc20_token_selector.ts
deleted file mode 100644
index 4d4218d22..000000000
--- a/packages/instant/src/containers/available_erc20_token_selector.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { State } from '../redux/reducer';
-import { ERC20Asset } from '../types';
-import { assetUtils } from '../util/asset';
-
-import { ERC20TokenSelector } from '../components/erc20_token_selector';
-import { Action, actions } from '../redux/actions';
-
-export interface AvailableERC20TokenSelectorProps {
- onTokenSelect?: (token: ERC20Asset) => void;
-}
-
-interface ConnectedState {
- tokens: ERC20Asset[];
-}
-
-interface ConnectedDispatch {
- onTokenSelect: (token: ERC20Asset) => void;
-}
-
-const mapStateToProps = (state: State, _ownProps: AvailableERC20TokenSelectorProps): ConnectedState => ({
- tokens: assetUtils.getERC20AssetsFromAssets(state.availableAssets || []),
-});
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- ownProps: AvailableERC20TokenSelectorProps,
-): ConnectedDispatch => ({
- onTokenSelect: (token: ERC20Asset) => {
- dispatch(actions.updateSelectedAsset(token));
- dispatch(actions.resetAmount());
- if (ownProps.onTokenSelect) {
- ownProps.onTokenSelect(token);
- }
- },
-});
-
-export const AvailableERC20TokenSelector: React.ComponentClass<AvailableERC20TokenSelectorProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(ERC20TokenSelector);