mirror of https://github.com/embarklabs/embark.git
remove sync methods as they are now unsupported
This commit is contained in:
parent
37ca90ad9b
commit
890faf260d
|
@ -12,7 +12,6 @@ class Provider {
|
|||
this.logger = options.logger;
|
||||
this.engine = new ProviderEngine();
|
||||
this.asyncMethods = {};
|
||||
this.syncMethods = {};
|
||||
|
||||
this.engine.addProvider(new RpcSubprovider({
|
||||
rpcUrl: options.web3Endpoint
|
||||
|
@ -44,9 +43,6 @@ class Provider {
|
|||
this.asyncMethods = {
|
||||
eth_accounts: self.eth_accounts.bind(this)
|
||||
};
|
||||
this.syncMethods = {
|
||||
eth_accounts: self.eth_accounts_sync.bind(this)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,10 +86,6 @@ class Provider {
|
|||
return cb(null, this.addresses);
|
||||
}
|
||||
|
||||
eth_accounts_sync() {
|
||||
return this.addresses;
|
||||
}
|
||||
|
||||
sendAsync(payload, callback) {
|
||||
let method = this.asyncMethods[payload.method];
|
||||
if (method) {
|
||||
|
@ -108,11 +100,7 @@ class Provider {
|
|||
this.engine.sendAsync.apply(this.engine, arguments);
|
||||
}
|
||||
|
||||
send(payload) {
|
||||
let method = this.syncMethods[payload.method];
|
||||
if (method) {
|
||||
return method.call(method, payload); // TODO check if that makes sense
|
||||
}
|
||||
send() {
|
||||
return this.engine.send.apply(this.engine, arguments);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue