aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-23 08:34:02 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-23 08:34:02 +0800
commit1e46d858e995c6c50f155f1bcdaf64b922402599 (patch)
tree36050c88174239f1f6d8b8b07681a9516ff2f00b /ui/app/app.js
parent822face7a3513a709277a197e27fd550b7b21954 (diff)
downloadtangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar.gz
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar.bz2
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar.lz
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar.xz
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.tar.zst
tangerine-wallet-browser-1e46d858e995c6c50f155f1bcdaf64b922402599.zip
Fix undefined provider menu item
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index f9694214a..94e8adc34 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -258,7 +258,7 @@ App.prototype.renderNetworkDropdown = function () {
activeNetworkRender: props.provider.rpcTarget,
}),
- this.renderCustomOption(props.provider.rpcTarget),
+ this.renderCustomOption(props.provider),
h(DropMenuItem, {
label: 'Custom RPC',
@@ -480,7 +480,10 @@ App.prototype.toggleMetamaskActive = function () {
}
}
-App.prototype.renderCustomOption = function (rpcTarget) {
+App.prototype.renderCustomOption = function (provider) {
+ const { rpcTarget, type } = provider
+ if (type !== 'rpc') return null
+
switch (rpcTarget) {
case 'http://localhost:8545':