chore: add to asset-buyer changelog.json
This commit is contained in:
		@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.2.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "`getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4",
 | 
			
		||||
                "pr": 1187
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.1.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ export class ZeroExInstant extends React.Component<ZeroExInstantProps> {
 | 
			
		||||
        // tslint:disable-next-line:no-floating-promises
 | 
			
		||||
        asyncData.fetchAndDispatchToStore(this._store);
 | 
			
		||||
        // tslint:disable-next-line:no-floating-promises
 | 
			
		||||
        this._flashErrorIfWrongNetwork(this._store.getState().network);
 | 
			
		||||
        this._flashErrorIfWrongNetwork();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public render(): React.ReactNode {
 | 
			
		||||
@@ -92,8 +92,9 @@ export class ZeroExInstant extends React.Component<ZeroExInstantProps> {
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private readonly _flashErrorIfWrongNetwork = async (network: Network): Promise<void> => {
 | 
			
		||||
    private readonly _flashErrorIfWrongNetwork = async (): Promise<void> => {
 | 
			
		||||
        const msToShowError = 30000; // 30 seconds
 | 
			
		||||
        const network = this._store.getState().network;
 | 
			
		||||
        const networkOfProvider = await web3Wrapper.getNetworkIdAsync();
 | 
			
		||||
        if (network !== networkOfProvider) {
 | 
			
		||||
            const errorMessage = `Wrong network detected. Try switching to ${Network[network]}.`;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user