aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/idStore.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-04 06:21:24 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-04 06:21:24 +0800
commitb2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c (patch)
treeb094a08b9ebe437f5b61d8d0749ff6fd995e908f /app/scripts/lib/idStore.js
parentd49ef1a2e54b0a9ac7a3d23d7744990543246ec6 (diff)
parent6dec937c2a3b72cd5863edef1ced818fe32e43f0 (diff)
downloadtangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar.gz
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar.bz2
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar.lz
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar.xz
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.tar.zst
tangerine-wallet-browser-b2b4b4dd25da0ac27fe2bcdb745ead9b193b6d9c.zip
Merge branch 'master' into display_network
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r--app/scripts/lib/idStore.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 85e8c8301..33d842d54 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)
@@ -156,7 +163,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()
@@ -372,7 +379,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)
}