diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-16 23:58:24 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-16 23:58:24 +0800 |
commit | c333d093b585fa0250a6973f2d396eb3cf227334 (patch) | |
tree | a00b3d77fb78c744ee0fee2b57ef25ce775b087d /packages/website/ts/blockchain.ts | |
parent | 1cfcc82ea9869e14c1a1b78e1376c89fdbeb91f4 (diff) | |
parent | 72f5719b3412da7840a7b85e4dce512ecbaece4d (diff) | |
download | dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar.gz dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar.bz2 dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar.lz dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar.xz dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.tar.zst dexon-sol-tools-c333d093b585fa0250a6973f2d396eb3cf227334.zip |
merge development
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index b1181e4c6..8955bbc30 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -374,7 +374,7 @@ export class Blockchain { return unavailableTakerAmount; } public getExchangeContractAddressIfExists(): string | undefined { - return this._contractWrappers.exchange.getContractAddress(); + return this._contractWrappers.exchange.address; } public async validateFillOrderThrowIfInvalidAsync( signedOrder: SignedOrder, @@ -859,10 +859,12 @@ export class Blockchain { shouldUserLedgerProvider, ); if (!_.isUndefined(this._contractWrappers)) { - this._contractWrappers.setProvider(provider, networkId); - } else { - this._contractWrappers = new ContractWrappers(provider, { networkId }); + this._contractWrappers.unsubscribeAll(); } + const contractWrappersConfig = { + networkId, + }; + this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig); if (!_.isUndefined(this._zeroEx)) { this._zeroEx.setProvider(provider, networkId); } else { |