aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/components/buy_order_state_buttons.tsx11
-rw-r--r--packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts24
-rw-r--r--packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx1
-rw-r--r--packages/instant/src/redux/actions.ts3
-rw-r--r--packages/instant/src/redux/reducer.ts6
5 files changed, 0 insertions, 45 deletions
diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx
index 6f197a772..df1664cd9 100644
--- a/packages/instant/src/components/buy_order_state_buttons.tsx
+++ b/packages/instant/src/components/buy_order_state_buttons.tsx
@@ -25,12 +25,8 @@ export interface BuyOrderStateButtonProps {
onBuySuccess: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
onBuyFailure: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
onRetry: () => void;
-
- // TODO: dont commit!
- secondaryProgressDemo: () => void;
}
-// TODO: rename to buttons
export const BuyOrderStateButtons: React.StatelessComponent<BuyOrderStateButtonProps> = props => {
if (props.buyOrderProcessingState === OrderProcessState.FAILURE) {
return (
@@ -54,15 +50,8 @@ export const BuyOrderStateButtons: React.StatelessComponent<BuyOrderStateButtonP
return <PlacingOrderButton />;
}
- const curTime = new Date().getTime();
- const expectedEndTime = curTime + 5000;
return (
<div>
- {/* <div style={{ marginBottom: '20px' }}>
- <SimulatedProgressBar startTimeUnix={curTime} expectedEndTimeUnix={expectedEndTime} ended={false} />
- </div> */}
-
- <SecondaryButton onClick={props.secondaryProgressDemo}>New progress bar demo</SecondaryButton>
<BuyButton
buyQuote={props.buyQuote}
assetBuyer={props.assetBuyer}
diff --git a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
index 5cfd1ff6c..247d57938 100644
--- a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
+++ b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
@@ -26,7 +26,6 @@ interface ConnectedDispatch {
onBuyFailure: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
onRetry: () => void;
onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void;
- secondaryProgressDemo: () => void;
}
export interface SelectedAssetBuyOrderStateButtons {}
const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyOrderStateButtons): ConnectedState => ({
@@ -113,29 +112,6 @@ const mapDispatchToProps = (
onRetry: () => {
dispatch(actions.resetAmount());
},
- secondaryProgressDemo: () => {
- const nowTime = new Date().getTime();
- const futureTime = nowTime + 5000;
- dispatch(
- actions.updateSimulatedOrderProgress({
- startTimeUnix: nowTime,
- expectedEndTimeUnix: futureTime,
- ended: false,
- }),
- );
-
- window.setTimeout(() => {
- console.log('simulate finishing');
-
- dispatch(
- actions.updateSimulatedOrderProgress({
- startTimeUnix: nowTime,
- expectedEndTimeUnix: futureTime,
- ended: true,
- }),
- );
- }, 2000);
- },
});
export const SelectedAssetBuyOrderStateButtons: React.ComponentClass<SelectedAssetBuyOrderStateButtons> = connect(
diff --git a/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx b/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx
index adb5daad8..a7acc4cb7 100644
--- a/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx
+++ b/packages/instant/src/containers/selected_asset_simulated_progress_bar.tsx
@@ -39,6 +39,5 @@ interface ConnectedState {
}
const mapStateToProps = (state: State, _ownProps: {}): ConnectedState => ({
buyOrderState: state.buyOrderState,
- simulatedProgress: state.simulatedProgress,
});
export const SelectedAssetSimulatedProgressBar = connect(mapStateToProps)(SelectedAssetSimulatedProgressComponent);
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
index c27c188bf..61c273510 100644
--- a/packages/instant/src/redux/actions.ts
+++ b/packages/instant/src/redux/actions.ts
@@ -28,7 +28,6 @@ export enum ActionTypes {
UPDATE_BUY_ORDER_STATE = 'UPDATE_BUY_ORDER_STATE',
UPDATE_LATEST_BUY_QUOTE = 'UPDATE_LATEST_BUY_QUOTE',
UPDATE_SELECTED_ASSET = 'UPDATE_SELECTED_ASSET',
- UPDATE_SIMULATED_ORDER_PROGRESS = 'UPDATE_SIMULATED_ORDER_PROGRESS',
SET_QUOTE_REQUEST_STATE_PENDING = 'SET_QUOTE_REQUEST_STATE_PENDING',
SET_QUOTE_REQUEST_STATE_FAILURE = 'SET_QUOTE_REQUEST_STATE_FAILURE',
SET_ERROR_MESSAGE = 'SET_ERROR_MESSAGE',
@@ -44,8 +43,6 @@ export const actions = {
updateBuyOrderState: (orderState: OrderState) => createAction(ActionTypes.UPDATE_BUY_ORDER_STATE, orderState),
updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote),
updateSelectedAsset: (assetData?: string) => createAction(ActionTypes.UPDATE_SELECTED_ASSET, assetData),
- updateSimulatedOrderProgress: (orderProgress: SimulatedProgress) =>
- createAction(ActionTypes.UPDATE_SIMULATED_ORDER_PROGRESS, orderProgress),
setQuoteRequestStatePending: () => createAction(ActionTypes.SET_QUOTE_REQUEST_STATE_PENDING),
setQuoteRequestStateFailure: () => createAction(ActionTypes.SET_QUOTE_REQUEST_STATE_FAILURE),
setErrorMessage: (errorMessage: string) => createAction(ActionTypes.SET_ERROR_MESSAGE, errorMessage),
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts
index 3540bd4eb..35c0ceee6 100644
--- a/packages/instant/src/redux/reducer.ts
+++ b/packages/instant/src/redux/reducer.ts
@@ -32,7 +32,6 @@ export interface State {
quoteRequestState: AsyncProcessState;
latestErrorMessage?: string;
latestErrorDisplayStatus: DisplayStatus;
- simulatedProgress?: SimulatedProgress;
}
export const INITIAL_STATE: State = {
@@ -121,11 +120,6 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State =>
...state,
selectedAsset: newSelectedAsset,
};
- case ActionTypes.UPDATE_SIMULATED_ORDER_PROGRESS:
- return {
- ...state,
- simulatedProgress: action.data,
- };
case ActionTypes.RESET_AMOUNT:
return {
...state,