diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-11-03 07:26:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-03 07:26:16 +0800 |
commit | 66261102de57e3bc86714577c021aa5c7e17c150 (patch) | |
tree | 2a146790ba3d0a632a23c7335a3dcbd9d5a8c881 /packages/instant/src/redux/actions.ts | |
parent | d0f20a4fd5d1ab563d4b1c941b55018da129334e (diff) | |
parent | 6748c36b033798de4eb56e5d4e49d1c4b4e7be1e (diff) | |
download | dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar.gz dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar.bz2 dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar.lz dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar.xz dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.tar.zst dexon-sol-tools-66261102de57e3bc86714577c021aa5c7e17c150.zip |
Merge pull request #1204 from 0xProject/feature/instant/maker-asset-datas-interface
[instant] Add `availableAssetDatas` to render method, fetch from asset-buyer if not specified, implement basic token selection
Diffstat (limited to 'packages/instant/src/redux/actions.ts')
-rw-r--r-- | packages/instant/src/redux/actions.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index 9397dcc99..c41c5054b 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -2,7 +2,7 @@ import { BuyQuote } from '@0x/asset-buyer'; import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; -import { ActionsUnion } from '../types'; +import { ActionsUnion, Asset } from '../types'; export interface PlainAction<T extends string> { type: T; @@ -30,6 +30,7 @@ export enum ActionTypes { 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_AVAILABLE_ASSETS = 'SET_AVAILABLE_ASSETS', 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', @@ -48,7 +49,8 @@ export const actions = { 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), + updateSelectedAsset: (asset: Asset) => createAction(ActionTypes.UPDATE_SELECTED_ASSET, asset), + setAvailableAssets: (availableAssets: Asset[]) => createAction(ActionTypes.SET_AVAILABLE_ASSETS, availableAssets), 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), |