diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-10-16 01:48:12 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-10-16 01:48:12 +0800 |
commit | 1481a3ef8e3352eb74fa11c4f578d15d84c76de7 (patch) | |
tree | 46b87a06085fee9438eb3cfefd104e92395c2f2f /app/scripts/lib | |
parent | 7cba71fc5590af115997f8120ac59f1293d6e2b9 (diff) | |
download | tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar.gz tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar.bz2 tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar.lz tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar.xz tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.tar.zst tangerine-wallet-browser-1481a3ef8e3352eb74fa11c4f578d15d84c76de7.zip |
Initial work on UI side
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/config-manager.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index ecc9bc5f7..d775e73fd 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -110,6 +110,16 @@ ConfigManager.prototype.setWallet = function (wallet) { this.setData(data) } +ConfigManager.prototype.getKeychains = function () { + return this.migrator.getData().keychains || [] +} + +ConfigManager.prototype.setKeychains = function (keychains) { + var data = this.migrator.getData() + data.keychains = keychains + this.setData(data) +} + ConfigManager.prototype.getSelectedAccount = function () { var config = this.getConfig() return config.selectedAccount @@ -249,6 +259,17 @@ ConfigManager.prototype.setNicknameForWallet = function (account, nickname) { // observable +ConfigManager.prototype.getSalt = function () { + var data = this.getData() + return ('salt' in data) && data.salt +} + +ConfigManager.prototype.setSalt = function(salt) { + var data = this.getData() + data.salt = salt + this.setData(data) +} + ConfigManager.prototype.subscribe = function (fn) { this._subs.push(fn) var unsubscribe = this.unsubscribe.bind(this, fn) |