aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js2
-rw-r--r--ui/app/app.js10
2 files changed, 10 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 337f05248..cda987cad 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -671,7 +671,7 @@ function markAccountsFound() {
function setRpcTarget (newRpc) {
return (dispatch) => {
- if (global.METAMASK_DEBUG) console.log(`background.setRpcTarget`)
+ log.debug(`background.setRpcTarget`)
background.setRpcTarget(newRpc)
background.updateFrequentRpcList(newRpc, (frequentRpcList) => {
const value = {
diff --git a/ui/app/app.js b/ui/app/app.js
index d8519def7..20f948770 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -501,6 +501,12 @@ App.prototype.renderCustomOption = function (provider) {
const { rpcTarget, type } = provider
if (type !== 'rpc') return null
+ // Concatenate long URLs
+ let label = rpcTarget
+ if (rpcTarget.length > 31) {
+ label = label.substr(0, 34) + '...'
+ }
+
switch (rpcTarget) {
case 'http://localhost:8545':
@@ -508,7 +514,8 @@ App.prototype.renderCustomOption = function (provider) {
default:
return h(DropMenuItem, {
- label: `${rpcTarget}`,
+ label,
+ key: rpcTarget,
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
icon: h('i.fa.fa-question-circle.fa-lg'),
activeNetworkRender: 'custom',
@@ -526,6 +533,7 @@ App.prototype.renderCommonRpc = function (rpcList, provider) {
} else {
return h(DropMenuItem, {
label: rpc,
+ key: rpc,
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setRpcTarget(rpc)),
icon: h('i.fa.fa-question-circle.fa-lg'),