diff --git a/public/views/add.html b/public/views/add.html index 52663759c..1ebd115de 100644 --- a/public/views/add.html +++ b/public/views/add.html @@ -1,7 +1,9 @@ - - Close - + + + Close + + @@ -23,4 +25,3 @@ - diff --git a/public/views/backup.html b/public/views/backup.html index 61be78fe4..b7eb32bb8 100644 --- a/public/views/backup.html +++ b/public/views/backup.html @@ -2,7 +2,7 @@ Backup Flow -     diff --git a/public/views/export.html b/public/views/export.html index 5232b0efb..9fcf01a17 100644 --- a/public/views/export.html +++ b/public/views/export.html @@ -3,7 +3,7 @@ Export Wallet -     diff --git a/public/views/preferences.html b/public/views/preferences.html index 8d3793bc4..42cd43217 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -12,10 +12,10 @@
Preferences
-
+
Wallet Name - {{alias||walletName}} + {{alias||wallet.walletName}}
@@ -34,29 +34,29 @@
Hardware wallet - {{externalSource}} + {{wallet.externalSource}}
-
- +
+ Wallet Color - {{index.alias||index.walletName}} + {{wallet.alias||wallet.walletName}}
-
+
Email Notifications - Disabled - {{index.preferences.email}} + Disabled + {{wallet.email}}
Security
-
+
Backup
@@ -65,14 +65,14 @@ Request Spending Password
-
+
Delete recovery phrase
Advanced
-
+
Advanced
diff --git a/public/views/preferencesAdvanced.html b/public/views/preferencesAdvanced.html index 6c3900a82..9abc61d32 100644 --- a/public/views/preferencesAdvanced.html +++ b/public/views/preferencesAdvanced.html @@ -2,7 +2,7 @@ Advanced Preferences -     @@ -11,27 +11,27 @@
-
+
Wallet Information
-
+
Sweep paper wallet
-
+
Export Wallet
-
+
Wallet Service URL
-
+
Transaction History
-
+
Delete Wallet
diff --git a/public/views/preferencesAlias.html b/public/views/preferencesAlias.html index 988fb9e67..ce0b52bca 100644 --- a/public/views/preferencesAlias.html +++ b/public/views/preferencesAlias.html @@ -2,7 +2,7 @@ Alias -     diff --git a/public/views/preferencesBwsUrl.html b/public/views/preferencesBwsUrl.html index 81ae2ada2..827160330 100644 --- a/public/views/preferencesBwsUrl.html +++ b/public/views/preferencesBwsUrl.html @@ -2,7 +2,7 @@ Wallet Service URL -     diff --git a/public/views/preferencesColor.html b/public/views/preferencesColor.html index d356610ef..111f3e1e2 100644 --- a/public/views/preferencesColor.html +++ b/public/views/preferencesColor.html @@ -2,7 +2,7 @@ Color -     diff --git a/public/views/preferencesDeleteWallet.html b/public/views/preferencesDeleteWallet.html index 26781c44a..323ba6602 100644 --- a/public/views/preferencesDeleteWallet.html +++ b/public/views/preferencesDeleteWallet.html @@ -2,7 +2,7 @@ Delete Wallet -     diff --git a/public/views/preferencesDeleteWords.html b/public/views/preferencesDeleteWords.html index bd9c69d28..090f2f7ad 100644 --- a/public/views/preferencesDeleteWords.html +++ b/public/views/preferencesDeleteWords.html @@ -2,7 +2,7 @@ Delete Recovery Phrase -     @@ -13,9 +13,9 @@ {{error|translate}}
Warning!
-
Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.
-
Need to do backup
-
+
Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.
+
Need to do backup
+
diff --git a/public/views/preferencesEmail.html b/public/views/preferencesEmail.html index 02477b291..2db928d1e 100644 --- a/public/views/preferencesEmail.html +++ b/public/views/preferencesEmail.html @@ -2,7 +2,7 @@ Email Notifications -     diff --git a/public/views/preferencesHistory.html b/public/views/preferencesHistory.html index 4bd955531..a51d6111a 100644 --- a/public/views/preferencesHistory.html +++ b/public/views/preferencesHistory.html @@ -2,7 +2,7 @@ Transaction History -     diff --git a/public/views/preferencesInformation.html b/public/views/preferencesInformation.html index 82f1787db..4b65250cc 100644 --- a/public/views/preferencesInformation.html +++ b/public/views/preferencesInformation.html @@ -1,9 +1,8 @@ - - Wallet Information + Wallet Information -     diff --git a/public/views/tab-settings.html b/public/views/tab-settings.html index 019ad8190..0b9028129 100644 --- a/public/views/tab-settings.html +++ b/public/views/tab-settings.html @@ -1,5 +1,7 @@ - Global Settings + + Global Settings +
diff --git a/public/views/walletDetails.html b/public/views/walletDetails.html index 0d845d9d3..7e4558cad 100644 --- a/public/views/walletDetails.html +++ b/public/views/walletDetails.html @@ -14,9 +14,7 @@
- - - +
No Wallet diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index 03b8734f8..916e78ae7 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('backupController', - function($rootScope, $scope, $timeout, $log, go, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, walletService, ongoingProcess) { + function($rootScope, $scope, $timeout, $log, $state, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, walletService, ongoingProcess) { var fc = profileService.focusedClient; var prevState; @@ -69,7 +69,7 @@ angular.module('copayApp.controllers').controller('backupController', }; $scope.goBack = function() { - go.path(prevState || 'walletHome'); + $state.go('wallet.preferences'); }; $scope.$on('$destroy', function() { diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js index 6d753c779..a23706cdc 100644 --- a/src/js/controllers/preferences.js +++ b/src/js/controllers/preferences.js @@ -3,40 +3,33 @@ angular.module('copayApp.controllers').controller('preferencesController', function($scope, $rootScope, $timeout, $log, $stateParams, configService, profileService, fingerprintService, walletService) { - var fc; - var config = configService.getSync(); - console.log($stateParams); - var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() { - $scope.init(); - }); - - $scope.$on('$destroy', function() { - disableFocusListener(); - }); + var wallet = profileService.getWallet($stateParams.walletId); + var walletId = wallet.credentials.walletId; + $scope.wallet = wallet; $scope.init = function() { $scope.externalSource = null; - fc = profileService.focusedClient; - if (fc) { - - $scope.backgroundColor = fc.color; + if (wallet) { + walletService.updateStatus(wallet, {}, function(err, status) {}); + var config = configService.getSync(); config.aliasFor = config.aliasFor || {}; - $scope.walletName = fc.credentials.walletName; - $scope.alias = config.aliasFor[fc.credentials.walletId] || $scope.walletName; - $scope.encryptEnabled = walletService.isEncrypted(fc); - if (fc.isPrivKeyExternal) - $scope.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor'; + $scope.alias = config.aliasFor[walletId] || wallet.credentials.walletName; + $scope.color = config.colorFor[walletId] || '#4A90E2'; + + $scope.encryptEnabled = walletService.isEncrypted(wallet); + if (wallet.isPrivKeyExternal) + $scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor'; // TODO externalAccount - //this.externalIndex = fc.getExternalIndex(); + //this.externalIndex = wallet.getExternalIndex(); } $scope.touchidAvailable = fingerprintService.isAvailable(); - $scope.touchidEnabled = config.touchIdFor ? config.touchIdFor[fc.credentials.walletId] : null; + $scope.touchidEnabled = config.touchIdFor ? config.touchIdFor[walletId] : null; $scope.deleted = false; - if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) { + if (wallet.credentials && !wallet.credentials.mnemonicEncrypted && !wallet.credentials.mnemonic) { $scope.deleted = true; } }; @@ -44,40 +37,40 @@ angular.module('copayApp.controllers').controller('preferencesController', var handleEncryptedWallet = function(cb) { $rootScope.$emit('Local/NeedsPassword', false, function(err, password) { if (err) return cb(err); - return cb(walletService.unlock(fc, password)); + return cb(walletService.unlock(wallet, password)); }); }; $scope.encryptChange = function() { - if (!fc) return; + if (!wallet) return; var val = $scope.encryptEnabled; var setPrivateKeyEncryption = function(password, cb) { - $log.debug('Encrypting private key for', fc.credentials.walletName); + $log.debug('Encrypting private key for', wallet.credentials.walletName); - fc.setPrivateKeyEncryption(password); - fc.lock(); - profileService.updateCredentials(JSON.parse(fc.export()), function() { + wallet.setPrivateKeyEncryption(password); + wallet.lock(); + profileService.updateCredentials(JSON.parse(wallet.export()), function() { $log.debug('Wallet encrypted'); return cb(); }); }; var disablePrivateKeyEncryption = function(cb) { - $log.debug('Disabling private key encryption for', fc.credentials.walletName); + $log.debug('Disabling private key encryption for', wallet.credentials.walletName); try { - fc.disablePrivateKeyEncryption(); + wallet.disablePrivateKeyEncryption(); } catch (e) { return cb(e); } - profileService.updateCredentials(JSON.parse(fc.export()), function() { + profileService.updateCredentials(JSON.parse(wallet.export()), function() { $log.debug('Wallet encryption disabled'); return cb(); }); }; - if (val && !walletService.isEncrypted(fc)) { + if (val && !walletService.isEncrypted(wallet)) { $rootScope.$emit('Local/NeedsPassword', true, function(err, password) { if (err || !password) { $scope.encryptEnabled = false; @@ -89,7 +82,7 @@ angular.module('copayApp.controllers').controller('preferencesController', }); }); } else { - if (!val && walletService.isEncrypted(fc)) { + if (!val && walletService.isEncrypted(wallet)) { handleEncryptedWallet(function(err) { if (err) { $scope.encryptEnabled = true; @@ -110,14 +103,13 @@ angular.module('copayApp.controllers').controller('preferencesController', }; $scope.touchidChange = function() { - var walletId = fc.credentials.walletId; var opts = { touchIdFor: {} }; opts.touchIdFor[walletId] = $scope.touchidEnabled; - fingerprintService.check(fc, function(err) { + fingerprintService.check(wallet, function(err) { if (err) { $log.debug(err); $timeout(function() { diff --git a/src/js/controllers/preferencesAlias.js b/src/js/controllers/preferencesAlias.js index aeec31fcd..f5537c9f7 100644 --- a/src/js/controllers/preferencesAlias.js +++ b/src/js/controllers/preferencesAlias.js @@ -1,15 +1,16 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesAliasController', - function($scope, $timeout, configService, profileService, go) { + function($scope, $timeout, $stateParams, $state, configService, profileService, walletService) { - var fc = profileService.focusedClient; - var walletId = fc.credentials.walletId; + var wallet = profileService.getWallet($stateParams.walletId); + $scope.wallet = wallet; + var walletId = wallet.credentials.walletId; var config = configService.getSync(); config.aliasFor = config.aliasFor || {}; - $scope.walletName = fc.credentials.walletName; - $scope.alias = config.aliasFor[walletId] || $scope.walletName; + $scope.walletName = wallet.credentials.walletName; + $scope.alias = config.aliasFor[walletId] || wallet.walletName; $scope.save = function() { var opts = { @@ -18,14 +19,8 @@ angular.module('copayApp.controllers').controller('preferencesAliasController', opts.aliasFor[walletId] = $scope.alias; configService.set(opts, function(err) { - if (err) { - $scope.$emit('Local/DeviceError', err); - return; - } - $scope.$emit('Local/AliasUpdated'); - $timeout(function() { - go.path('preferences'); - }, 50); + if (err) $log.warn(err); + $state.go('wallet.preferences') }); }; }); diff --git a/src/js/controllers/preferencesColor.js b/src/js/controllers/preferencesColor.js index 5281d0166..a6ebe7ca8 100644 --- a/src/js/controllers/preferencesColor.js +++ b/src/js/controllers/preferencesColor.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, configService, profileService, go) { +angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, $stateParams, $state, configService, profileService) { $scope.colorList = [ '#DD4B39', @@ -19,8 +19,9 @@ angular.module('copayApp.controllers').controller('preferencesColorController', '#7A8C9E', ]; - var fc = profileService.focusedClient; - var walletId = fc.credentials.walletId; + var wallet = profileService.getWallet($stateParams.walletId); + $scope.wallet = wallet; + var walletId = wallet.credentials.walletId; var config = configService.getSync(); config.colorFor = config.colorFor || {}; @@ -33,9 +34,8 @@ angular.module('copayApp.controllers').controller('preferencesColorController', opts.colorFor[walletId] = color; configService.set(opts, function(err) { - go.preferences(); if (err) $log.warn(err); - $scope.$emit('Local/ColorUpdated'); + $state.go('wallet.preferences'); }); }; }); diff --git a/src/js/controllers/preferencesDeleteWords.js b/src/js/controllers/preferencesDeleteWords.js index af7a9b140..f64134302 100644 --- a/src/js/controllers/preferencesDeleteWords.js +++ b/src/js/controllers/preferencesDeleteWords.js @@ -1,20 +1,24 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, confirmDialog, lodash, notification, profileService, go, gettext) { - var fc = profileService.focusedClient; +angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, $state, $stateParams, confirmDialog, lodash, notification, profileService, walletService, gettext) { + + var wallet = profileService.getWallet($stateParams.walletId); var msg = gettext('Are you sure you want to delete the recovery phrase?'); var successMsg = gettext('Recovery phrase deleted'); - if (lodash.isEmpty(fc.credentials.mnemonic) && lodash.isEmpty(fc.credentials.mnemonicEncrypted)) + walletService.needsBackup(wallet, function(needsBackup) { + $scope.needsBackup = needsBackup; + }); + if (lodash.isEmpty(wallet.credentials.mnemonic) && lodash.isEmpty(wallet.credentials.mnemonicEncrypted)) $scope.deleted = true; $scope.delete = function() { confirmDialog.show(msg, function(ok) { if (ok) { - fc.clearMnemonic(); - profileService.updateCredentials(JSON.parse(fc.export()), function() { + wallet.clearMnemonic(); + profileService.updateCredentials(JSON.parse(wallet.export()), function() { notification.success(successMsg); - go.walletHome(); + $state.go('wallet.details'); }); } }); diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js index 5a7d233ee..6e929e7f6 100644 --- a/src/js/controllers/preferencesEmail.js +++ b/src/js/controllers/preferencesEmail.js @@ -1,17 +1,16 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, go, profileService, walletService) { +angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $state, $stateParams, profileService, walletService) { $scope.save = function(form) { - var fc = profileService.focusedClient; + var wallet = profileService.getWallet($stateParams.walletId); var email = $scope.email || ''; - walletService.updateRemotePreferences(fc, { + walletService.updateRemotePreferences(wallet, { email: email, }, function(err) { - if (!err) - $rootScope.$emit('Local/EmailUpdated', email); - go.path('preferences'); + if (err) $log.warn(err); + $state.go('wallet.preferences'); }); }; diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 279389173..7728104a0 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -85,7 +85,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.wallet = wallet; if (wallet) { - profileService.setAndStoreFocus(wallet.id, function() {}); walletService.updateStatus(wallet, {}, function(err, status) { if (err) {} // TODO }); diff --git a/src/js/routes.js b/src/js/routes.js index c7935ea41..8f1edee76 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -105,13 +105,68 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }) .state('wallet.details', { url: '/details', - needProfile: true, - templateUrl: 'views/walletDetails.html' + templateUrl: 'views/walletDetails.html', + needProfile: true }) .state('wallet.preferences', { url: '/preferences', - needProfile: true, - templateUrl: 'views/preferences.html' + templateUrl: 'views/preferences.html', + needProfile: true + }) + .state('wallet.preferencesAlias', { + url: '/preferencesAlias', + templateUrl: 'views/preferencesAlias.html', + needProfile: true + }) + .state('wallet.preferencesColor', { + url: '/preferencesColor', + templateUrl: 'views/preferencesColor.html', + needProfile: true + }) + .state('wallet.preferencesEmail', { + url: '/preferencesEmail', + templateUrl: 'views/preferencesEmail.html', + needProfile: true + }) + .state('wallet.backup', { + url: '/backup', + templateUrl: 'views/backup.html', + needProfile: true + }) + .state('wallet.preferencesAdvanced', { + url: '/preferencesAdvanced', + templateUrl: 'views/preferencesAdvanced.html', + needProfile: true + }) + .state('wallet.information', { + url: '/information', + templateUrl: 'views/preferencesInformation.html', + needProfile: true + }) + .state('wallet.export', { + url: '/export', + templateUrl: 'views/export.html', + needProfile: true + }) + .state('wallet.preferencesBwsUrl', { + url: '/preferencesBwsUrl', + templateUrl: 'views/preferencesBwsUrl.html', + needProfile: true + }) + .state('wallet.preferencesHistory', { + url: '/preferencesHistory', + templateUrl: 'views/preferencesHistory.html', + needProfile: true + }) + .state('wallet.deleteWords', { + url: '/deleteWords', + templateUrl: 'views/preferencesDeleteWords.html', + needProfile: true + }) + .state('wallet.delete', { + url: '/delete', + templateUrl: 'views/preferencesDeleteWallet.html', + needProfile: true }) .state('wallet.copayers', { url: '/copayers', @@ -435,26 +490,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, } }) - .state('preferencesAdvanced', { - url: '/preferencesAdvanced', - templateUrl: 'views/preferencesAdvanced.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesAdvanced.html' - }, - } - }) - .state('preferencesColor', { - url: '/preferencesColor', - templateUrl: 'views/preferencesColor.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesColor.html' - }, - } - }) .state('preferencesAltCurrency', { url: '/preferencesAltCurrency', templateUrl: 'views/preferencesAltCurrency.html', @@ -465,79 +500,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, } }) - .state('preferencesAlias', { - url: '/preferencesAlias', - templateUrl: 'views/preferencesAlias.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesAlias.html' - }, - - } - }) - .state('preferencesEmail', { - url: '/preferencesEmail', - templateUrl: 'views/preferencesEmail.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesEmail.html' - }, - - } - }) - .state('preferencesBwsUrl', { - url: '/preferencesBwsUrl', - templateUrl: 'views/preferencesBwsUrl.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesBwsUrl.html' - }, - - } - }) - .state('preferencesHistory', { - url: '/preferencesHistory', - templateUrl: 'views/preferencesHistory.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesHistory.html' - }, - - } - }) - .state('deleteWords', { - url: '/deleteWords', - templateUrl: 'views/preferencesDeleteWords.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesDeleteWords.html' - }, - } - }) - .state('delete', { - url: '/delete', - templateUrl: 'views/preferencesDeleteWallet.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesDeleteWallet.html' - }, - } - }) - .state('information', { - url: '/information', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/preferencesInformation.html' - }, - } - }) .state('about', { url: '/about', templateUrl: 'views/preferencesAbout.html', @@ -558,16 +520,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, } }) - .state('export', { - url: '/export', - templateUrl: 'views/export.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/export.html' - }, - } - }) .state('paperWallet', { url: '/paperWallet', templateUrl: 'views/paperWallet.html', @@ -578,16 +530,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, } }) - .state('backup', { - url: '/backup', - templateUrl: 'views/backup.html', - needProfile: true, - views: { - 'main': { - templateUrl: 'views/backup.html' - }, - } - }) .state('preferencesGlobal', { url: '/preferencesGlobal', needProfile: true, diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index a79f2c75e..094b66218 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -10,15 +10,15 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim var root = {}; - // // RECEIVE - // // Check address - // root.isUsed(wallet.walletId, balance.byAddress, function(err, used) { - // if (used) { - // $log.debug('Address used. Creating new'); - // $rootScope.$emit('Local/AddressIsUsed'); - // } - // }); - // + // // RECEIVE + // // Check address + // root.isUsed(wallet.walletId, balance.byAddress, function(err, used) { + // if (used) { + // $log.debug('Address used. Creating new'); + // $rootScope.$emit('Local/AddressIsUsed'); + // } + // }); + // root.Utils = bwcService.getUtils(); root.formatAmount = function(amount, fullPrecision) { @@ -71,7 +71,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim root.needsBackup = function(wallet, cb) { - if (!walletService.requiresBackup(wallet)) + if (!root.requiresBackup(wallet)) return cb(false); storageService.getBackupFlag(wallet.credentials.walletId, function(err, val) { @@ -103,8 +103,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim return; // TODO!!! if (err instanceof errors.NOT_AUTHORIZED) { -console.log('[walletService.js.93] TODO NOT AUTH'); //TODO -// TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO + console.log('[walletService.js.93] TODO NOT AUTH'); //TODO + // TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO self.notAuthorized = true; go.walletHome(); } else if (err instanceof errors.NOT_FOUND) { @@ -178,19 +178,18 @@ console.log('[walletService.js.93] TODO NOT AUTH'); //TODO }; root.setStatus = function(wallet, status) { - wallet.status = status; wallet.statusUpdatedOn = Date.now(); wallet.isValid = true; root.setBalance(wallet, status.balance); - + wallet.email = status.preferences.email; }; root.updateStatus = function(wallet, opts, cb, initStatusHash, tries) { tries = tries || 0; opts = opts || {}; - if (wallet.isValid && ! opts.force) + if (wallet.isValid && !opts.force) return; @@ -799,7 +798,7 @@ console.log('[walletService.js.93] TODO NOT AUTH'); //TODO }; root.getAddress = function(wallet, forceNew, cb) { -console.log('[walletService.js.786:wallet:]',wallet, forceNew); //TODO + console.log('[walletService.js.786:wallet:]', wallet, forceNew); //TODO var firstStep; if (forceNew) {