rename bwsError service to bwcError

This commit is contained in:
Gabriel Bazán 2016-07-11 11:46:48 -03:00
commit a369934635
14 changed files with 80 additions and 80 deletions

View file

@ -1,7 +1,7 @@
'use strict';
'use strict';
angular.module('copayApp.services')
.factory('addressService', function(storageService, profileService, $log, $timeout, lodash, bwsError, gettextCatalog) {
.factory('addressService', function(storageService, profileService, $log, $timeout, lodash, bwcError, gettextCatalog) {
var root = {};
root.expireAddress = function(walletId, cb) {
@ -44,7 +44,7 @@ angular.module('copayApp.services')
return cb(null, addr[0].address);
});
}
return bwsError.cb(err, prefix, cb);
return bwcError.cb(err, prefix, cb);
}
return cb(null, addr.address);
});

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services')
.factory('bwsError', function bwcErrorService($log, gettextCatalog) {
.factory('bwcError', function bwcErrorService($log, gettextCatalog) {
var root = {};
root.msg = function(err, prefix) {

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services')
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, notificationService, pushNotificationsService, gettext, gettextCatalog, bwsError, uxLanguage, bitcore, platformInfo, walletService) {
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, notificationService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, bitcore, platformInfo, walletService) {
var isChromeApp = platformInfo.isChromeApp;
@ -357,7 +357,7 @@ angular.module('copayApp.services')
singleAddress: opts.singleAddress,
walletPrivKey: opts.walletPrivKey,
}, function(err, secret) {
if (err) return bwsError.cb(err, gettext('Error creating wallet'), cb);
if (err) return bwcError.cb(err, gettext('Error creating wallet'), cb);
return cb(null, walletClient, secret);
});
});
@ -405,8 +405,8 @@ angular.module('copayApp.services')
// check if exist
if (lodash.find(root.profile.credentials, {
'walletId': walletData.walletId
})) {
'walletId': walletData.walletId
})) {
return cb(gettext('Cannot join the same wallet more that once'));
}
} catch (ex) {
@ -420,7 +420,7 @@ angular.module('copayApp.services')
if (err) return cb(err);
walletClient.joinWallet(opts.secret, opts.myName || 'me', {}, function(err) {
if (err) return bwsError.cb(err, gettext('Could not join wallet'), cb);
if (err) return bwcError.cb(err, gettext('Could not join wallet'), cb);
root.addAndBindWalletClient(walletClient, {
bwsurl: opts.bwsurl
}, cb);
@ -583,7 +583,7 @@ angular.module('copayApp.services')
if (err instanceof errors.NOT_AUTHORIZED)
return cb(err);
return bwsError.cb(err, gettext('Could not import'), cb);
return bwcError.cb(err, gettext('Could not import'), cb);
}
root.addAndBindWalletClient(walletClient, {
@ -614,7 +614,7 @@ angular.module('copayApp.services')
if (err instanceof errors.NOT_AUTHORIZED)
return cb(err);
return bwsError.cb(err, gettext('Could not import'), cb);
return bwcError.cb(err, gettext('Could not import'), cb);
}
root.addAndBindWalletClient(walletClient, {
@ -637,7 +637,7 @@ angular.module('copayApp.services')
if (err instanceof errors.NOT_AUTHORIZED)
err.name = 'WALLET_DOES_NOT_EXIST';
return bwsError.cb(err, gettext('Could not import'), cb);
return bwcError.cb(err, gettext('Could not import'), cb);
}
root.addAndBindWalletClient(walletClient, {