fix error handler for join

This commit is contained in:
Matias Alejo Garcia 2015-04-24 03:37:18 -03:00
commit 460ddfa3bc
3 changed files with 11 additions and 5 deletions

View file

@ -151,7 +151,6 @@ angular.module('copayApp.services')
})
};
// TODO copayer name
root.createWallet = function(opts, cb) {
var walletClient = bwcService.getClient();
$log.debug('Creating Wallet:', opts);
@ -191,8 +190,7 @@ angular.module('copayApp.services')
}
// TODO name
walletClient.joinWallet(opts.secret, opts.myName || 'me', function(err) {
// TODO: err
if (err) return cb('Error joining wallet' + err);
if (err) return cb(err);
root.profile.credentials.push(JSON.parse(walletClient.export()));
root.setWalletClients();