aboutsummaryrefslogtreecommitdiffstats
path: root/src/web3_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 18:28:07 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 18:28:07 +0800
commit55b00ab3809973e385b6baffd9c44d6db5540b12 (patch)
tree8dec738d372f593b4567e0233f5157a03e3bcda6 /src/web3_wrapper.ts
parent87491e67414aad0fc30b3df4610bfd8e2ac4b96d (diff)
downloaddexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar.gz
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar.bz2
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar.lz
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar.xz
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.tar.zst
dexon-sol-tools-55b00ab3809973e385b6baffd9c44d6db5540b12.zip
Add setProvider method to 0x.js that updates the web3 provider and invalidates any contractInstances instantiated with the old provider
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r--src/web3_wrapper.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts
index 97d04db8c..a532085ce 100644
--- a/src/web3_wrapper.ts
+++ b/src/web3_wrapper.ts
@@ -9,6 +9,9 @@ export class Web3Wrapper {
this.web3 = new Web3();
this.web3.setProvider(web3.currentProvider);
}
+ public setProvider(provider: Web3.Provider) {
+ this.web3.setProvider(provider);
+ }
public isAddress(address: string): boolean {
return this.web3.isAddress(address);
}