aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/latest_buy_quote_order_details.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/containers/latest_buy_quote_order_details.ts')
-rw-r--r--packages/instant/src/containers/latest_buy_quote_order_details.ts41
1 files changed, 0 insertions, 41 deletions
diff --git a/packages/instant/src/containers/latest_buy_quote_order_details.ts b/packages/instant/src/containers/latest_buy_quote_order_details.ts
deleted file mode 100644
index 148735c47..000000000
--- a/packages/instant/src/containers/latest_buy_quote_order_details.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { oc } from 'ts-optchain';
-
-import { Action, actions } from '../redux/actions';
-import { State } from '../redux/reducer';
-
-import { OrderDetails, OrderDetailsProps } from '../components/order_details';
-import { AsyncProcessState, BaseCurrency, Omit } from '../types';
-import { assetUtils } from '../util/asset';
-
-type DispatchProperties = 'onBaseCurrencySwitchEth' | 'onBaseCurrencySwitchUsd';
-
-interface ConnectedState extends Omit<OrderDetailsProps, DispatchProperties> {}
-const mapStateToProps = (state: State, _ownProps: LatestBuyQuoteOrderDetailsProps): ConnectedState => ({
- // use the worst case quote info
- buyQuoteInfo: oc(state).latestBuyQuote.worstCaseQuoteInfo(),
- selectedAssetUnitAmount: state.selectedAssetUnitAmount,
- ethUsdPrice: state.ethUsdPrice,
- isLoading: state.quoteRequestState === AsyncProcessState.Pending,
- assetName: assetUtils.bestNameForAsset(state.selectedAsset),
- baseCurrency: state.baseCurrency,
-});
-
-interface ConnectedDispatch extends Pick<OrderDetailsProps, DispatchProperties> {}
-const mapDispatchToProps = (dispatch: Dispatch<Action>): ConnectedDispatch => ({
- onBaseCurrencySwitchEth: () => {
- dispatch(actions.updateBaseCurrency(BaseCurrency.ETH));
- },
- onBaseCurrencySwitchUsd: () => {
- dispatch(actions.updateBaseCurrency(BaseCurrency.USD));
- },
-});
-
-export interface LatestBuyQuoteOrderDetailsProps {}
-export const LatestBuyQuoteOrderDetails: React.ComponentClass<LatestBuyQuoteOrderDetailsProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(OrderDetails);