aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux/actions.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 04:28:52 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 04:28:52 +0800
commitd160792923c76c5bd0f61e7af2580c158dddc3d4 (patch)
tree422a523890fd1243795890d51d6b2917ec6fdc69 /packages/instant/src/redux/actions.ts
parentb0f2ab45e9761cc760b94d8567df8ba66956388c (diff)
parent6a57a7b5be151114bb06c171560976b09a8c4aa1 (diff)
downloaddexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar.gz
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar.bz2
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar.lz
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar.xz
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.tar.zst
dexon-sol-tools-d160792923c76c5bd0f61e7af2580c158dddc3d4.zip
Merge branch 'development' into fix/instant/decimal-fields-scaling-amount-input-bn
Diffstat (limited to 'packages/instant/src/redux/actions.ts')
-rw-r--r--packages/instant/src/redux/actions.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
index a0781db19..16bda0208 100644
--- a/packages/instant/src/redux/actions.ts
+++ b/packages/instant/src/redux/actions.ts
@@ -23,7 +23,11 @@ function createAction<T extends string, P>(type: T, data?: P): PlainAction<T> |
export enum ActionTypes {
UPDATE_ETH_USD_PRICE = 'UPDATE_ETH_USD_PRICE',
UPDATE_SELECTED_ASSET_AMOUNT = 'UPDATE_SELECTED_ASSET_AMOUNT',
- UPDATE_BUY_ORDER_STATE = 'UPDATE_BUY_ORDER_STATE',
+ SET_BUY_ORDER_STATE_NONE = 'SET_BUY_ORDER_STATE_NONE',
+ SET_BUY_ORDER_STATE_VALIDATING = 'SET_BUY_ORDER_STATE_VALIDATING',
+ SET_BUY_ORDER_STATE_PROCESSING = 'SET_BUY_ORDER_STATE_PROCESSING',
+ SET_BUY_ORDER_STATE_FAILURE = 'SET_BUY_ORDER_STATE_FAILURE',
+ SET_BUY_ORDER_STATE_SUCCESS = 'SET_BUY_ORDER_STATE_SUCCESS',
UPDATE_LATEST_BUY_QUOTE = 'UPDATE_LATEST_BUY_QUOTE',
UPDATE_SELECTED_ASSET = 'UPDATE_SELECTED_ASSET',
SET_QUOTE_REQUEST_STATE_PENDING = 'SET_QUOTE_REQUEST_STATE_PENDING',
@@ -37,7 +41,12 @@ export enum ActionTypes {
export const actions = {
updateEthUsdPrice: (price?: BigNumber) => createAction(ActionTypes.UPDATE_ETH_USD_PRICE, price),
updateSelectedAssetAmount: (amount?: BigNumber) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, amount),
- updateBuyOrderState: (orderState: OrderState) => createAction(ActionTypes.UPDATE_BUY_ORDER_STATE, orderState),
+ setBuyOrderStateNone: () => createAction(ActionTypes.SET_BUY_ORDER_STATE_NONE),
+ setBuyOrderStateValidating: () => createAction(ActionTypes.SET_BUY_ORDER_STATE_VALIDATING),
+ setBuyOrderStateProcessing: (txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) =>
+ createAction(ActionTypes.SET_BUY_ORDER_STATE_PROCESSING, { txHash, startTimeUnix, expectedEndTimeUnix }),
+ setBuyOrderStateFailure: (txHash: string) => createAction(ActionTypes.SET_BUY_ORDER_STATE_FAILURE, txHash),
+ setBuyOrderStateSuccess: (txHash: string) => createAction(ActionTypes.SET_BUY_ORDER_STATE_SUCCESS, txHash),
updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote),
updateSelectedAsset: (assetData?: string) => createAction(ActionTypes.UPDATE_SELECTED_ASSET, assetData),
setQuoteRequestStatePending: () => createAction(ActionTypes.SET_QUOTE_REQUEST_STATE_PENDING),