aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux/actions.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-01 10:20:37 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-01 10:21:06 +0800
commit6091ee732d208eaf9889087b8308dfd0427b9be5 (patch)
treec13189159cc172c9f82340a8d3a2bd69eed47f6e /packages/instant/src/redux/actions.ts
parent8c336925601127c759ad4cfbca119368a2edfd56 (diff)
downloaddexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.gz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.bz2
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.lz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.xz
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.zst
dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.zip
feat: modify public API to allow for passing in available assets, or fetch assets from SRA
Diffstat (limited to 'packages/instant/src/redux/actions.ts')
-rw-r--r--packages/instant/src/redux/actions.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
index bfae68e2b..eadd8b42c 100644
--- a/packages/instant/src/redux/actions.ts
+++ b/packages/instant/src/redux/actions.ts
@@ -4,7 +4,7 @@ import * as _ from 'lodash';
import { BigNumberInput } from '../util/big_number_input';
-import { ActionsUnion, OrderState } from '../types';
+import { ActionsUnion, Asset, OrderState } from '../types';
export interface PlainAction<T extends string> {
type: T;
@@ -28,6 +28,7 @@ export enum ActionTypes {
UPDATE_BUY_ORDER_STATE = 'UPDATE_BUY_ORDER_STATE',
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',
@@ -43,6 +44,7 @@ export const actions = {
updateBuyOrderState: (orderState: OrderState) => createAction(ActionTypes.UPDATE_BUY_ORDER_STATE, orderState),
updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote),
updateSelectedAsset: (assetData?: string) => createAction(ActionTypes.UPDATE_SELECTED_ASSET, assetData),
+ 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),