diff options
author | Brandon Millman <brandon@0xproject.com> | 2018-10-30 01:58:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 01:58:11 +0800 |
commit | fdf9e860dedf5dbe7840951f304a33ac2d7b1b51 (patch) | |
tree | 2acfc843dce83d5f8643980f9c74af25d12a18df /packages/instant/src/redux/reducer.ts | |
parent | 4e4291eccdd6c837bbec70603aa6eb64d3aa8d85 (diff) | |
parent | 3f35239b27653da898218e53909982203fad6d17 (diff) | |
download | dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar.gz dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar.bz2 dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar.lz dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar.xz dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.tar.zst dexon-sol-tools-fdf9e860dedf5dbe7840951f304a33ac2d7b1b51.zip |
Merge pull request #1187 from 0xProject/feature/instant/fixed-orders-in-render-method
[instant] Add ability to toggle render settings through URL, flash error on incorrect network, provided liquidity
Diffstat (limited to 'packages/instant/src/redux/reducer.ts')
-rw-r--r-- | packages/instant/src/redux/reducer.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 614ed21ac..dd9403052 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -29,8 +29,8 @@ export interface State { ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; quoteRequestState: AsyncProcessState; - latestError?: any; - latestErrorDisplay: DisplayStatus; + latestErrorMessage?: string; + latestErrorDisplayStatus: DisplayStatus; } export const INITIAL_STATE: State = { @@ -40,8 +40,8 @@ export const INITIAL_STATE: State = { buyOrderState: { processState: OrderProcessState.NONE }, ethUsdPrice: undefined, latestBuyQuote: undefined, - latestError: undefined, - latestErrorDisplay: DisplayStatus.Hidden, + latestErrorMessage: undefined, + latestErrorDisplayStatus: DisplayStatus.Hidden, quoteRequestState: AsyncProcessState.NONE, }; @@ -88,22 +88,22 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => ...state, buyOrderState: action.data, }; - case ActionTypes.SET_ERROR: + case ActionTypes.SET_ERROR_MESSAGE: return { ...state, - latestError: action.data, - latestErrorDisplay: DisplayStatus.Present, + latestErrorMessage: action.data, + latestErrorDisplayStatus: DisplayStatus.Present, }; case ActionTypes.HIDE_ERROR: return { ...state, - latestErrorDisplay: DisplayStatus.Hidden, + latestErrorDisplayStatus: DisplayStatus.Hidden, }; case ActionTypes.CLEAR_ERROR: return { ...state, - latestError: undefined, - latestErrorDisplay: DisplayStatus.Hidden, + latestErrorMessage: undefined, + latestErrorDisplayStatus: DisplayStatus.Hidden, }; case ActionTypes.UPDATE_SELECTED_ASSET: const newSelectedAssetData = action.data; |