aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/selected_asset_buy_button.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-25 04:16:28 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-25 04:24:35 +0800
commitdb3ad83ebca88e0faf2529ec468044e6ce4d5746 (patch)
tree3929a5f13c59e428644162669a93902effa5f051 /packages/instant/src/containers/selected_asset_buy_button.ts
parent979527a5ee3efaf2974703b91b0af3440195219e (diff)
downloaddexon-0x-contracts-db3ad83ebca88e0faf2529ec468044e6ce4d5746.tar.gz
dexon-0x-contracts-db3ad83ebca88e0faf2529ec468044e6ce4d5746.tar.zst
dexon-0x-contracts-db3ad83ebca88e0faf2529ec468044e6ce4d5746.zip
Introduce new OrderProcessState
Diffstat (limited to 'packages/instant/src/containers/selected_asset_buy_button.ts')
-rw-r--r--packages/instant/src/containers/selected_asset_buy_button.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/containers/selected_asset_buy_button.ts b/packages/instant/src/containers/selected_asset_buy_button.ts
index 428939e79..1d8b3b4bd 100644
--- a/packages/instant/src/containers/selected_asset_buy_button.ts
+++ b/packages/instant/src/containers/selected_asset_buy_button.ts
@@ -6,7 +6,7 @@ import { Dispatch } from 'redux';
import { Action, actions } from '../redux/actions';
import { State } from '../redux/reducer';
-import { AsyncProcessState } from '../types';
+import { AsyncProcessState, OrderProcessState } from '../types';
import { BuyButton } from '../components/buy_button';
@@ -30,10 +30,10 @@ const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyButtonProps):
});
const mapDispatchToProps = (dispatch: Dispatch<Action>, ownProps: SelectedAssetBuyButtonProps): ConnectedDispatch => ({
- onClick: buyQuote => dispatch(actions.updateBuyOrderState({ processState: AsyncProcessState.PENDING })),
+ onClick: buyQuote => dispatch(actions.updateBuyOrderState({ processState: OrderProcessState.AWAITING_SIGNATURE })),
onBuySuccess: (buyQuote: BuyQuote, txnHash: string) =>
- dispatch(actions.updateBuyOrderState({ processState: AsyncProcessState.SUCCESS, txnHash })),
- onBuyFailure: buyQuote => dispatch(actions.updateBuyOrderState({ processState: AsyncProcessState.FAILURE })),
+ dispatch(actions.updateBuyOrderState({ processState: OrderProcessState.SUCCESS, txnHash })),
+ onBuyFailure: buyQuote => dispatch(actions.updateBuyOrderState({ processState: OrderProcessState.FAILURE })),
onBuyPrevented: (buyQuote, error) => {
dispatch(actions.resetAmount());
dispatch(actions.setError(error));