From b1fb8da3b00b68060443066608dc511a4a836b86 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 25 Oct 2016 14:16:04 -0700 Subject: [PATCH 1/5] Fix provider menu selection indication --- ui/app/app.js | 15 +++++++-------- ui/app/components/drop-menu-item.js | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ui/app/app.js b/ui/app/app.js index 71e0637d0..ae6fe7071 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -240,6 +240,7 @@ App.prototype.renderNetworkDropdown = function () { action: () => props.dispatch(actions.setProviderType('testnet')), icon: h('.menu-icon.red-dot'), activeNetworkRender: props.network, + provider: props.provider, }), h(DropMenuItem, { @@ -250,13 +251,6 @@ App.prototype.renderNetworkDropdown = function () { activeNetworkRender: props.provider.rpcTarget, }), - h(DropMenuItem, { - label: 'Custom RPC', - closeMenu: () => this.setState({ isNetworkMenuOpen: false }), - action: () => this.props.dispatch(actions.showConfigPage()), - icon: h('i.fa.fa-question-circle.fa-lg'), - }), - this.renderCustomOption(props.provider.rpcTarget), ]) } @@ -508,7 +502,12 @@ App.prototype.toggleMetamaskActive = function () { App.prototype.renderCustomOption = function (rpcTarget) { switch (rpcTarget) { case undefined: - return null + return h(DropMenuItem, { + label: 'Custom RPC', + closeMenu: () => this.setState({ isNetworkMenuOpen: false }), + action: () => this.props.dispatch(actions.showConfigPage()), + icon: h('i.fa.fa-question-circle.fa-lg'), + }) case 'http://localhost:8545': return h(DropMenuItem, { diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 0ca1988c6..8088680c0 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -42,7 +42,7 @@ DropMenuItem.prototype.activeNetworkRender = function () { if (providerType === 'mainnet') return h('.check', '✓') break case 'Morden Test Network': - if (activeNetwork === '2') return h('.check', '✓') + if (provider.type === 'testnet') return h('.check', '✓') break case 'Localhost 8545': if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') From f2497c5a97b78e4ea8b3c1c47d89e45334626986 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 25 Oct 2016 14:17:15 -0700 Subject: [PATCH 2/5] Bump changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c442050..e7695defc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Current Master - Add a check for improper Transaction data. +- Fix bug where custom provider selection could show duplicate items. +- Fix bug where connecting to a local morden node would make two providers appear selected. ## 2.13.5 2016-10-18 From bda64ab132e87d4f717f257935a842f7368f0776 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 25 Oct 2016 14:58:04 -0700 Subject: [PATCH 3/5] Fix delegate call analysis Fixed reference allowing transactions to be analyzed for delegate call again. --- CHANGELOG.md | 1 + app/scripts/lib/idStore.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c442050..0586b8ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Add a check for improper Transaction data. +- Fix bug that was sometimes preventing transactions from being sent. ## 2.13.5 2016-10-18 diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 402a5e612..cb14a5145 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -247,7 +247,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone // perform static analyis on the target contract code function analyzeForDelegateCall(cb){ if (txParams.to) { - query.getCode(txParams.to, function (err, result) { + query.getCode(txParams.to, (err, result) => { if (err) return cb(err) var containsDelegateCall = this.checkForDelegateCall(result) txData.containsDelegateCall = containsDelegateCall From b3613232a2817ac32d624950164d6269a7ce16e7 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 25 Oct 2016 16:54:43 -0700 Subject: [PATCH 4/5] Rename wallet to account Fixes #762 --- CHANGELOG.md | 1 + app/scripts/lib/idStore.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c442050..ba3bee37a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Add a check for improper Transaction data. +- Now nicknaming new accounts "Account #" instead of "Wallet #" for clarity. ## 2.13.5 2016-10-18 diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 402a5e612..6b492e040 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -426,7 +426,7 @@ IdentityStore.prototype._loadIdentities = function () { // // add to ethStore this._ethStore.addAccount(ethUtil.addHexPrefix(address)) // add to identities - const defaultLabel = 'Wallet ' + (i + 1) + const defaultLabel = 'Account ' + (i + 1) const nickname = configManager.nicknameForWallet(address) var identity = { name: nickname || defaultLabel, From 21e73311115504aebb206a24f3084ee304157647 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 25 Oct 2016 17:41:50 -0700 Subject: [PATCH 5/5] Fix delegate call function reference 2 --- app/scripts/lib/idStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index cb14a5145..27372b3e9 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -249,7 +249,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone if (txParams.to) { query.getCode(txParams.to, (err, result) => { if (err) return cb(err) - var containsDelegateCall = this.checkForDelegateCall(result) + var containsDelegateCall = self.checkForDelegateCall(result) txData.containsDelegateCall = containsDelegateCall cb() })