handle 0 wallets
This commit is contained in:
parent
22c378b080
commit
43c0eb9cb6
5 changed files with 23 additions and 23 deletions
|
|
@ -190,9 +190,8 @@ Identity.open = function(email, password, opts, cb) {
|
|||
iden.profile = profile;
|
||||
|
||||
var wids = _.pluck(iden.listWallets(), 'id');
|
||||
|
||||
if (!wids || !wids.length)
|
||||
return new Error('Could not open any wallet from profile');
|
||||
return cb(new Error('Could not open any wallet from profile'), iden);
|
||||
|
||||
// Open All wallets from profile
|
||||
//This could be optional, or opts.onlyOpen = wid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue