aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.js.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 18:31:16 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 18:31:16 +0800
commitfc3be810a25ce98402c686bd41606e08e7b5c2ac (patch)
treeda0d7ee884c9df78ee7fc0659517075461b35096 /src/0x.js.ts
parent104b7f2549e0164f629594c590b3d2d936ba66d0 (diff)
downloaddexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar.gz
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar.bz2
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar.lz
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar.xz
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.tar.zst
dexon-sol-tools-fc3be810a25ce98402c686bd41606e08e7b5c2ac.zip
Implement zeroEx.exchange.subscribeAsync made sure to clean up subscriptions if user updates the provider
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r--src/0x.js.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts
index 967c81ed8..0cda7732d 100644
--- a/src/0x.js.ts
+++ b/src/0x.js.ts
@@ -115,9 +115,9 @@ export class ZeroEx {
/**
* Sets a new provider for the web3 instance used by 0x.js
*/
- public setProvider(provider: Web3.Provider) {
+ public async setProviderAsync(provider: Web3.Provider) {
this.web3Wrapper.setProvider(provider);
- this.exchange.invalidateContractInstance();
+ await this.exchange.invalidateContractInstanceAsync();
this.tokenRegistry.invalidateContractInstance();
this.token.invalidateContractInstances();
}