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() {
|
Identity.prototype.getLastFocusedWallet = function() {
|
||||||
|
if (_.keys(this.wallets).length == 0) return;
|
||||||
return _.max(this.wallets, function(wallet) {
|
return _.max(this.wallets, function(wallet) {
|
||||||
return wallet.lastTimestamp || 0;
|
return wallet.lastTimestamp || 0;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,3 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue