aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-10 03:04:44 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-10 03:04:44 +0800
commit39657b633bd386526f5772238cbebfb976427c07 (patch)
tree18b15a7cf1e830f59647e047c2298b792d1f9258 /packages
parent2e8f74abce7be3a5799bb93a0360d299de55b621 (diff)
downloaddexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar.gz
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar.bz2
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar.lz
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar.xz
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.tar.zst
dexon-0x-contracts-39657b633bd386526f5772238cbebfb976427c07.zip
Make sure we only update price when they are not in the middle of an order
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/redux/async_data.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts
index 7af6e1e56..c7fe4cd0e 100644
--- a/packages/instant/src/redux/async_data.ts
+++ b/packages/instant/src/redux/async_data.ts
@@ -2,7 +2,7 @@ import { AssetProxyId } from '@0x/types';
import * as _ from 'lodash';
import { BIG_NUMBER_ZERO } from '../constants';
-import { AccountState, ERC20Asset } from '../types';
+import { AccountState, ERC20Asset, OrderProcessState } from '../types';
import { assetUtils } from '../util/asset';
import { buyQuoteUpdater } from '../util/buy_quote_updater';
import { coinbaseApi } from '../util/coinbase_api';
@@ -75,11 +75,12 @@ export const asyncData = {
}
},
fetchCurrentBuyQuoteAndDispatchToStore: async (store: Store, setPending: boolean) => {
- const { providerState, selectedAsset, selectedAssetAmount, affiliateInfo } = store.getState();
+ const { buyOrderState, providerState, selectedAsset, selectedAssetAmount, affiliateInfo } = store.getState();
const assetBuyer = providerState.assetBuyer;
if (
!_.isUndefined(selectedAssetAmount) &&
!_.isUndefined(selectedAsset) &&
+ buyOrderState.processState === OrderProcessState.None &&
selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20
) {
await buyQuoteUpdater.updateBuyQuoteAsync(