From f49b6ca1dc6b71a3280135a0a901311b289c26ed Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 11:30:46 -0700 Subject: Replicated really strange bug with test --- app/scripts/lib/config-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 0af82c89c..337671c42 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -152,7 +152,7 @@ ConfigManager.prototype.getCurrentRpcAddress = function () { ConfigManager.prototype.clearWallet = function () { var data = this.getConfig() delete data.wallet - this.setData(data) + this.setConfig(data) } ConfigManager.prototype.setData = function (data) { -- cgit v1.2.3 From 6fef01c8a156c70e5a6034767a7ce86506f566f3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 11:31:27 -0700 Subject: Emphasizing how weird this bug is by removing all behavior from the method. --- app/scripts/lib/config-manager.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 337671c42..ca115d49e 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -149,11 +149,7 @@ ConfigManager.prototype.getCurrentRpcAddress = function () { } } -ConfigManager.prototype.clearWallet = function () { - var data = this.getConfig() - delete data.wallet - this.setConfig(data) -} +ConfigManager.prototype.clearWallet = function () {} ConfigManager.prototype.setData = function (data) { this.migrator.saveData(data) -- cgit v1.2.3 From 78f2794d39ccfff79a6562d6fdc628f375291598 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 11:34:34 -0700 Subject: Remove useless and buggy clearWallet function --- app/scripts/lib/config-manager.js | 2 -- app/scripts/lib/idStore.js | 3 --- 2 files changed, 5 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index ca115d49e..caaae8a75 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -149,8 +149,6 @@ ConfigManager.prototype.getCurrentRpcAddress = function () { } } -ConfigManager.prototype.clearWallet = function () {} - ConfigManager.prototype.setData = function (data) { this.migrator.saveData(data) } diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index f705c07a7..cbc8c1e48 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -43,9 +43,6 @@ function IdentityStore (opts = {}) { IdentityStore.prototype.createNewVault = function (password, entropy, cb) { delete this._keyStore - if (this.configManager) { - this.configManager.clearWallet() - } this._createIdmgmt(password, null, entropy, (err) => { if (err) return cb(err) -- cgit v1.2.3 From cc970ccd0d4d039d58cb7fe359487574a2d3d980 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 30 Jun 2016 15:31:36 -0700 Subject: fix typo --- app/scripts/metamask-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 398086274..470591323 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -195,7 +195,7 @@ module.exports = class MetamaskController { if (!state.isUnlocked) { this.opts.unlockAccountMessage() } else { - this.addUnconfirmedMsg(msgParams, cb) + this.addUnconfirmedMessage(msgParams, cb) } } -- cgit v1.2.3 From e55938ed15428b452224f2d731c1e7ad141869d4 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 18:22:16 -0700 Subject: First simple version of ui mocker --- app/scripts/popup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/popup.js b/app/scripts/popup.js index 5c5cf0455..2e5b98896 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -54,12 +54,14 @@ function setupControllerConnection (stream, cb) { } function getCurrentDomain (cb) { + const unknown = '' + if (!chrome.tabs) return cb(null, unknown) chrome.tabs.query({active: true, currentWindow: true}, function (results) { var activeTab = results[0] var currentUrl = activeTab && activeTab.url var currentDomain = url.parse(currentUrl).host if (!currentUrl) { - return cb(null, '') + return cb(null, unknown) } cb(null, currentDomain) }) @@ -78,7 +80,7 @@ function setupApp (err, opts) { alert(err.stack) throw err } - + clearNotifications() var container = document.getElementById('app-content') -- cgit v1.2.3