handling profile with no wallets
This commit is contained in:
parent
0656c8d7e0
commit
fc0535a69f
2 changed files with 40 additions and 40 deletions
|
|
@ -519,6 +519,7 @@ Identity.prototype.decodeSecret = function(secret) {
|
|||
};
|
||||
|
||||
Identity.prototype.getLastFocusedWallet = function() {
|
||||
if (_.keys(this.wallets).length == 0) return;
|
||||
return _.max(this.wallets, function(wallet) {
|
||||
return wallet.lastTimestamp || 0;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services')
|
||||
.factory('identityService', function($rootScope, $location, pluginManager, controllerUtils) {
|
||||
.factory('identityService', function($rootScope, $location, pluginManager, controllerUtils) {
|
||||
var root = {};
|
||||
|
||||
root.create = function (scope, form) {
|
||||
root.create = function(scope, form) {
|
||||
copay.Identity.create({
|
||||
email: form.email.$modelValue,
|
||||
password: form.password.$modelValue,
|
||||
|
|
@ -21,7 +21,7 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
|
||||
root.open = function (scope, form) {
|
||||
root.open = function(scope, form) {
|
||||
copay.Identity.open({
|
||||
email: form.email.$modelValue,
|
||||
password: form.password.$modelValue,
|
||||
|
|
@ -44,5 +44,4 @@ angular.module('copayApp.services')
|
|||
}
|
||||
|
||||
return root;
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue