From 5509bf5aebe0cb2c97e4750850521a089cc0ed99 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Mon, 15 Oct 2018 18:04:29 -0700 Subject: Update website to use the new unsubscribeAll method in contract-wrappers --- packages/website/ts/blockchain.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index de1622686..8955bbc30 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -859,13 +859,12 @@ export class Blockchain { shouldUserLedgerProvider, ); if (!_.isUndefined(this._contractWrappers)) { - this._contractWrappers.setProvider(provider); - } else { - const contractWrappersConfig = { - networkId, - }; - this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig); + this._contractWrappers.unsubscribeAll(); } + const contractWrappersConfig = { + networkId, + }; + this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig); if (!_.isUndefined(this._zeroEx)) { this._zeroEx.setProvider(provider, networkId); } else { -- cgit