From e6b278569ea072aa88416e769d4803a73b77194c Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 24 May 2017 11:34:26 -0700 Subject: [PATCH] inpage-provider - disable polling after first block --- app/scripts/lib/inpage-provider.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index e54f547bd..39196e240 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -44,8 +44,9 @@ function MetamaskInpageProvider (connectionStream) { (err) => logStreamDisconnectWarning('MetaMask RpcProvider', err) ) - // start polling + // start and stop polling to unblock first block lock engine.start() + engine.once('latest', () => engine.stop()) self.idMap = {} // handle sendAsync requests via asyncProvider