In WalletService, createAddress now terminated properly, preventing double callback.
This commit is contained in:
parent
6626663a31
commit
e649da69ef
1 changed files with 2 additions and 1 deletions
|
|
@ -884,7 +884,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
var createAddress = function(wallet, cb) {
|
||||
$log.debug('Creating address for wallet:', wallet.id);
|
||||
|
||||
wallet.createAddress({}, function(err, addr) {
|
||||
wallet.createAddress({}, function onWalletCreatedAddress(err, addr) {
|
||||
if (err) {
|
||||
var prefix = gettextCatalog.getString('Could not create address');
|
||||
if (err instanceof errors.CONNECTION_ERROR || (err.message && err.message.match(/5../))) {
|
||||
|
|
@ -902,6 +902,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
if (err) return cb(err);
|
||||
return cb(null, addr[0].address);
|
||||
});
|
||||
return;
|
||||
}
|
||||
return bwcError.cb(err, prefix, cb);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue