diff options
author | kumavis <aaron@kumavis.me> | 2019-04-04 22:11:28 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2019-04-04 22:11:28 +0800 |
commit | 89693a23151d4ff37295f14b04d7c64297d842c5 (patch) | |
tree | 12ac41f2d299e8d5b51160d8b07386385e7ad370 /app/scripts/lib | |
parent | cf4eac3f2c693269e8a5025d4f5f2240d7be13e7 (diff) | |
download | tangerine-wallet-browser-89693a23151d4ff37295f14b04d7c64297d842c5.tar.gz tangerine-wallet-browser-89693a23151d4ff37295f14b04d7c64297d842c5.tar.zst tangerine-wallet-browser-89693a23151d4ff37295f14b04d7c64297d842c5.zip |
metamask-controller - use improved provider-as-middleware utility
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/createProviderMiddleware.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/scripts/lib/createProviderMiddleware.js b/app/scripts/lib/createProviderMiddleware.js deleted file mode 100644 index 8a939ba4e..000000000 --- a/app/scripts/lib/createProviderMiddleware.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = createProviderMiddleware - -/** - * Forwards an HTTP request to the current Web3 provider - * - * @param {{ provider: Object }} config Configuration containing current Web3 provider - */ -function createProviderMiddleware ({ provider }) { - return (req, res, next, end) => { - provider.sendAsync(req, (err, _res) => { - if (err) return end(err) - res.result = _res.result - end() - }) - } -} |