diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-10-27 02:14:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-27 02:14:00 +0800 |
commit | 4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f (patch) | |
tree | dbfc6614e901c44d32775b1fe69bb957706c9cf0 /packages/instant/src/redux | |
parent | d2bf23de71bc2bdfaca14bd7026daa59ca5ef386 (diff) | |
parent | 30809e646be02025d6f9e9ed0ff214d9ace681c8 (diff) | |
download | dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar.gz dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar.bz2 dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar.lz dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar.xz dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.tar.zst dexon-sol-tools-4c5b26db183f8f9163e043f5dd4bb0ce60e3aa7f.zip |
Merge pull request #1175 from 0xProject/feature/instant/input-fees-rounding
[instant] Create a ScalingInput component and use it in the amount input and upgrade to styled-components v4
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r-- | packages/instant/src/redux/actions.ts | 5 | ||||
-rw-r--r-- | packages/instant/src/redux/reducer.ts | 3 |
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 25d0092b2..d7e5bdfb5 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -14,6 +14,7 @@ import { OrderState, } from '../types'; import { assetUtils } from '../util/asset'; +import { BigNumberInput } from '../util/big_number_input'; import { Action, ActionTypes } from './actions'; @@ -22,7 +23,7 @@ export interface State { assetBuyer?: AssetBuyer; assetMetaDataMap: ObjectMap<AssetMetaData>; selectedAsset?: Asset; - selectedAssetAmount?: BigNumber; + selectedAssetAmount?: BigNumberInput; buyOrderState: OrderState; ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; |