remove sync methods as they are now unsupported

This commit is contained in:
Jonathan Rainville 2018-05-14 12:12:14 -04:00
parent 37ca90ad9b
commit 890faf260d
1 changed files with 1 additions and 13 deletions

View File

@ -12,7 +12,6 @@ class Provider {
this.logger = options.logger; this.logger = options.logger;
this.engine = new ProviderEngine(); this.engine = new ProviderEngine();
this.asyncMethods = {}; this.asyncMethods = {};
this.syncMethods = {};
this.engine.addProvider(new RpcSubprovider({ this.engine.addProvider(new RpcSubprovider({
rpcUrl: options.web3Endpoint rpcUrl: options.web3Endpoint
@ -44,9 +43,6 @@ class Provider {
this.asyncMethods = { this.asyncMethods = {
eth_accounts: self.eth_accounts.bind(this) 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); return cb(null, this.addresses);
} }
eth_accounts_sync() {
return this.addresses;
}
sendAsync(payload, callback) { sendAsync(payload, callback) {
let method = this.asyncMethods[payload.method]; let method = this.asyncMethods[payload.method];
if (method) { if (method) {
@ -108,11 +100,7 @@ class Provider {
this.engine.sendAsync.apply(this.engine, arguments); this.engine.sendAsync.apply(this.engine, arguments);
} }
send(payload) { send() {
let method = this.syncMethods[payload.method];
if (method) {
return method.call(method, payload); // TODO check if that makes sense
}
return this.engine.send.apply(this.engine, arguments); return this.engine.send.apply(this.engine, arguments);
} }
} }