aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/idStore.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-03 07:52:18 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-03 07:52:18 +0800
commit9cc04be5e467ea6f41584c42cc742680163a6fe6 (patch)
tree1dfa5a964ac95efb3c85a0c5559d1413c6918e94 /app/scripts/lib/idStore.js
parent01e63d41ede22a7290553f888261583d22b24eda (diff)
downloadtangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar.gz
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar.bz2
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar.lz
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar.xz
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.tar.zst
tangerine-wallet-browser-9cc04be5e467ea6f41584c42cc742680163a6fe6.zip
Added seed word recovery to config screen
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 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)
}