diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-10-25 03:53:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 03:53:18 +0800 |
commit | 059868e9942fed4616750d212e706f09d17f397b (patch) | |
tree | 7c70fcd71641479479ff831e9e665f7b8e69fa30 /packages/instant/src/redux/reducer.ts | |
parent | 06ba26a6d30565e7c6c4032528089d30ecc39fdd (diff) | |
parent | 09f0bf7f0062bba51380ae904bff96baddf5f0f2 (diff) | |
download | dexon-0x-contracts-059868e9942fed4616750d212e706f09d17f397b.tar.gz dexon-0x-contracts-059868e9942fed4616750d212e706f09d17f397b.tar.zst dexon-0x-contracts-059868e9942fed4616750d212e706f09d17f397b.zip |
Merge pull request #1179 from 0xProject/feature/instant/processing-state
[instant] Success and Processing state
Diffstat (limited to 'packages/instant/src/redux/reducer.ts')
-rw-r--r-- | packages/instant/src/redux/reducer.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index ddcb144b1..c6a05ac52 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -4,7 +4,7 @@ import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { assetMetaDataMap } from '../data/asset_meta_data_map'; -import { Asset, AssetMetaData, AsyncProcessState, DisplayStatus, Network } from '../types'; +import { Asset, AssetMetaData, AsyncProcessState, DisplayStatus, Network, OrderState } from '../types'; import { assetUtils } from '../util/asset'; import { Action, ActionTypes } from './actions'; @@ -15,7 +15,7 @@ export interface State { assetMetaDataMap: ObjectMap<AssetMetaData>; selectedAsset?: Asset; selectedAssetAmount?: BigNumber; - buyOrderState: AsyncProcessState; + buyOrderState: OrderState; ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; quoteRequestState: AsyncProcessState; @@ -27,7 +27,7 @@ export const INITIAL_STATE: State = { network: Network.Mainnet, selectedAssetAmount: undefined, assetMetaDataMap, - buyOrderState: AsyncProcessState.NONE, + buyOrderState: { processState: AsyncProcessState.NONE }, ethUsdPrice: undefined, latestBuyQuote: undefined, latestError: undefined, @@ -65,7 +65,7 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => latestBuyQuote: undefined, quoteRequestState: AsyncProcessState.FAILURE, }; - case ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE: + case ActionTypes.UPDATE_BUY_ORDER_STATE: return { ...state, buyOrderState: action.data, @@ -106,7 +106,7 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => ...state, latestBuyQuote: undefined, quoteRequestState: AsyncProcessState.NONE, - buyOrderState: AsyncProcessState.NONE, + buyOrderState: { processState: AsyncProcessState.NONE }, selectedAssetAmount: undefined, }; default: |