From a2d09a68b0d6d20359916251e0cc795fb600360e Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 25 Oct 2018 15:03:30 -0700 Subject: chore: add to asset-buyer changelog.json --- packages/instant/src/components/zero_ex_instant.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/instant/src/components') diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx index 9018c9427..bf7cc9de5 100644 --- a/packages/instant/src/components/zero_ex_instant.tsx +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -79,7 +79,7 @@ export class ZeroExInstant extends React.Component { // 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 { ); } - private readonly _flashErrorIfWrongNetwork = async (network: Network): Promise => { + private readonly _flashErrorIfWrongNetwork = async (): Promise => { 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]}.`; -- cgit