update tokenByAddress after tokenStateByAddress to avoid race-condition
This commit is contained in:
parent
6a9f10cd36
commit
6118561bb5
@ -269,7 +269,6 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
|
|||||||
|
|
||||||
newTokenEntry.isTracked = true;
|
newTokenEntry.isTracked = true;
|
||||||
trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
|
trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
|
||||||
this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
balance,
|
balance,
|
||||||
@ -281,6 +280,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
|
|||||||
allowance,
|
allowance,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
|
||||||
this.setState({
|
this.setState({
|
||||||
isAddingTokenToTracked: false,
|
isAddingTokenToTracked: false,
|
||||||
assetView: AssetViews.ASSET_PICKER,
|
assetView: AssetViews.ASSET_PICKER,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user