From 9cc04be5e467ea6f41584c42cc742680163a6fe6 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 2 Jun 2016 16:52:18 -0700 Subject: Added seed word recovery to config screen --- app/scripts/lib/idStore.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'app/scripts/lib') diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 4ce4fd6f2..991827603 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -59,6 +59,13 @@ IdentityStore.prototype.createNewVault = function(password, entropy, cb){ }) } +IdentityStore.prototype.recoverSeed = function(cb){ + configManager.setShowSeedWords(true) + if (!this_idmgmt) return cb(new Error('Unauthenticated. Please sign in.')) + var seedWords = this._idmgmt.getSeed() + cb(null, seedWords) +} + IdentityStore.prototype.recoverFromSeed = function(password, seed, cb){ this._createIdmgmt(password, seed, null, (err) => { if (err) return cb(err) @@ -150,7 +157,7 @@ IdentityStore.prototype.setLocked = function(cb){ } IdentityStore.prototype.submitPassword = function(password, cb){ - this._tryPassword(password, (err) => { + this.tryPassword(password, (err) => { if (err) return cb(err) // load identities before returning... this._loadIdentities() @@ -366,7 +373,7 @@ IdentityStore.prototype._mayBeFauceting = function(i) { // keyStore managment - unlocking + deserialization // -IdentityStore.prototype._tryPassword = function(password, cb){ +IdentityStore.prototype.tryPassword = function(password, cb){ this._createIdmgmt(password, null, null, cb) } -- cgit v1.2.3 From 07617dbb075bc0d98725e1116bc936aabda65486 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 2 Jun 2016 17:11:10 -0700 Subject: Add login check --- app/scripts/lib/idStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/lib') diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 991827603..e9fc10cea 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -61,7 +61,7 @@ IdentityStore.prototype.createNewVault = function(password, entropy, cb){ IdentityStore.prototype.recoverSeed = function(cb){ configManager.setShowSeedWords(true) - if (!this_idmgmt) return cb(new Error('Unauthenticated. Please sign in.')) + if (!this._idmgmt) return cb(new Error('Unauthenticated. Please sign in.')) var seedWords = this._idmgmt.getSeed() cb(null, seedWords) } -- cgit v1.2.3