aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-26 09:35:06 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-26 09:35:06 +0800
commitd5d99b9d2e3c793a95c68c1035246644b3ae80c6 (patch)
tree880f13fd7dba96285c23986e505f3166de099a4c /packages/instant/src/redux
parentab2759f43105c0f2d441790e138840706c6759f8 (diff)
downloaddexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar.gz
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar.bz2
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar.lz
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar.xz
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.tar.zst
dexon-sol-tools-d5d99b9d2e3c793a95c68c1035246644b3ae80c6.zip
chore: dont override toString of BigNumber and other PR feedback
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r--packages/instant/src/redux/actions.ts5
-rw-r--r--packages/instant/src/redux/reducer.ts3
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
index 5a4099f15..46045024b 100644
--- a/packages/instant/src/redux/actions.ts
+++ b/packages/instant/src/redux/actions.ts
@@ -2,6 +2,8 @@ import { BuyQuote } from '@0x/asset-buyer';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
+import { BigNumberInput } from '../util/big_number_input';
+
import { ActionsUnion, OrderState } from '../types';
export interface PlainAction<T extends string> {
@@ -36,7 +38,8 @@ 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),
+ updateSelectedAssetAmount: (amount?: BigNumberInput) =>
+ createAction(ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, amount),
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),
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts
index c6a05ac52..665cba257 100644
--- a/packages/instant/src/redux/reducer.ts
+++ b/packages/instant/src/redux/reducer.ts
@@ -6,6 +6,7 @@ import * as _ from 'lodash';
import { assetMetaDataMap } from '../data/asset_meta_data_map';
import { Asset, AssetMetaData, AsyncProcessState, DisplayStatus, Network, OrderState } from '../types';
import { assetUtils } from '../util/asset';
+import { BigNumberInput } from '../util/big_number_input';
import { Action, ActionTypes } from './actions';
@@ -14,7 +15,7 @@ export interface State {
assetBuyer?: AssetBuyer;
assetMetaDataMap: ObjectMap<AssetMetaData>;
selectedAsset?: Asset;
- selectedAssetAmount?: BigNumber;
+ selectedAssetAmount?: BigNumberInput;
buyOrderState: OrderState;
ethUsdPrice?: BigNumber;
latestBuyQuote?: BuyQuote;