aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkiebell <40266861+pinkiebell@users.noreply.github.com>2018-07-25 06:03:36 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-25 06:03:36 +0800
commit3667f3cb8556d55ad893ec8c1a0f84447273906f (patch)
tree527bbca7ec0b09bab3485c4df00e22d8ab44b466
parentfed9ae0deed5853014cfc76b4314195d477f14f4 (diff)
downloadtangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar.gz
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar.bz2
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar.lz
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar.xz
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.tar.zst
tangerine-wallet-browser-3667f3cb8556d55ad893ec8c1a0f84447273906f.zip
network.js: convert rpc protocol to lower case (#4855)
Fixes #4253
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/scripts/controllers/network/network.js3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2d78b6b1..7e1e1ff4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Add Trezor Support
- Allow to remove accounts (Imported and Hardware Wallets)
- [#4840](https://github.com/MetaMask/metamask-extension/pull/4840): Now shows notifications when transactions are completed.
+- [#4855](https://github.com/MetaMask/metamask-extension/pull/4855): network.js: convert rpc protocol to lower case.
## 4.8.0 Thur Jun 14 2018
diff --git a/app/scripts/controllers/network/network.js b/app/scripts/controllers/network/network.js
index a50f6dc45..b6f7705b5 100644
--- a/app/scripts/controllers/network/network.js
+++ b/app/scripts/controllers/network/network.js
@@ -9,6 +9,7 @@ const extend = require('xtend')
const EthQuery = require('eth-query')
const createEventEmitterProxy = require('../../lib/events-proxy.js')
const log = require('loglevel')
+const urlUtil = require('url')
const {
ROPSTEN,
RINKEBY,
@@ -155,6 +156,8 @@ module.exports = class NetworkController extends EventEmitter {
}
_configureStandardProvider ({ rpcUrl }) {
+ // urlUtil handles malformed urls
+ rpcUrl = urlUtil.parse(rpcUrl).format()
const providerParams = extend(this._baseProviderParams, {
rpcUrl,
engineParams: {