diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 09:04:29 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 09:04:29 +0800 |
commit | 5509bf5aebe0cb2c97e4750850521a089cc0ed99 (patch) | |
tree | b6beed8bd57ad43c509d30bebe1e07c2852e69cf /packages/website/ts | |
parent | 2c63909d5df06db0f0646af577cbe896b6bf216f (diff) | |
download | dexon-0x-contracts-5509bf5aebe0cb2c97e4750850521a089cc0ed99.tar.gz dexon-0x-contracts-5509bf5aebe0cb2c97e4750850521a089cc0ed99.tar.zst dexon-0x-contracts-5509bf5aebe0cb2c97e4750850521a089cc0ed99.zip |
Update website to use the new unsubscribeAll method in contract-wrappers
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 11 |
1 files changed, 5 insertions, 6 deletions
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 { |