From 890faf260db3634ae2bbb20196d14cbc0354248e Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 14 May 2018 12:12:14 -0400 Subject: [PATCH] remove sync methods as they are now unsupported --- lib/core/provider.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/core/provider.js b/lib/core/provider.js index f9165d58..bda1e037 100644 --- a/lib/core/provider.js +++ b/lib/core/provider.js @@ -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); } }