fix create

This commit is contained in:
matiu 2017-09-11 11:45:19 -03:00
commit 7653d1b6ab

View file

@ -322,6 +322,7 @@ angular.module('copayApp.services')
var walletClient = bwcService.getClient(null, opts);
var network = opts.networkName || 'livenet';
console.log('[profileService.js.324]'); //TODO
if (opts.mnemonic) {
try {
opts.mnemonic = root._normalizeMnemonic(opts.mnemonic);
@ -386,6 +387,7 @@ angular.module('copayApp.services')
}
}
}
return cb(null, walletClient);
};
// Creates a wallet on BWC/BWS
@ -393,6 +395,7 @@ angular.module('copayApp.services')
$log.debug('Creating Wallet:', opts);
$timeout(function() {
seedWallet(opts, function(err, walletClient) {
console.log('[profileService.js.395:walletClient:]',walletClient); //TODO
if (err) return cb(err);
var name = opts.name || gettextCatalog.getString('Personal Wallet');
@ -404,6 +407,7 @@ angular.module('copayApp.services')
walletPrivKey: opts.walletPrivKey,
coin: opts.coin
}, function(err, secret) {
console.log('[profileService.js.407:err:]',err); //TODO
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
return cb(null, walletClient, secret);
});