handle 0 wallets

This commit is contained in:
Ivan Socolsky 2014-10-15 17:18:30 -03:00 committed by Matias Alejo Garcia
commit 43c0eb9cb6
5 changed files with 23 additions and 23 deletions

View file

@ -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