aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-24 03:58:27 +0800
committerFabio Berger <me@fabioberger.com>2017-11-24 03:58:27 +0800
commit6118561bb5928a19e7e2e8e7fed7f80c7af842b9 (patch)
tree5d5df5e34eb65a8419f0fc017b725d73d3fec25b /packages/website
parent6a9f10cd36e254bfb43f13e5728b5346823b5cfa (diff)
downloaddexon-0x-contracts-6118561bb5928a19e7e2e8e7fed7f80c7af842b9.tar.gz
dexon-0x-contracts-6118561bb5928a19e7e2e8e7fed7f80c7af842b9.tar.zst
dexon-0x-contracts-6118561bb5928a19e7e2e8e7fed7f80c7af842b9.zip
update tokenByAddress after tokenStateByAddress to avoid race-condition
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/components/generate_order/asset_picker.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/website/ts/components/generate_order/asset_picker.tsx b/packages/website/ts/components/generate_order/asset_picker.tsx
index 59826d06e..410b0440a 100644
--- a/packages/website/ts/components/generate_order/asset_picker.tsx
+++ b/packages/website/ts/components/generate_order/asset_picker.tsx
@@ -269,7 +269,6 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
newTokenEntry.isTracked = true;
trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
- this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
const [
balance,
@@ -281,6 +280,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
allowance,
},
});
+ this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
this.setState({
isAddingTokenToTracked: false,
assetView: AssetViews.ASSET_PICKER,