Renamed service

This commit is contained in:
Gustavo Maximiliano Cortez 2016-02-11 14:06:30 -05:00
parent 90fba0de7a
commit c471afb6d9
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
4 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesController', angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, configService, profileService, txSignService) { function($scope, $rootScope, $timeout, $log, configService, profileService, txService) {
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
$scope.deleted = false; $scope.deleted = false;
@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
}; };
opts.touchIdFor[walletId] = newVal; opts.touchIdFor[walletId] = newVal;
txSignService.setTouchId(function(err) { txService.setTouchId(function(err) {
if (err) { if (err) {
$log.debug(err); $log.debug(err);
$timeout(function() { $timeout(function() {

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('sellGlideraController', angular.module('copayApp.controllers').controller('sellGlideraController',
function($scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp, animationService, txSignService) { function($scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp, animationService, txService) {
var self = this; var self = this;
var config = configService.getSync(); var config = configService.getSync();
@ -130,7 +130,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
self.error = null; self.error = null;
txSignService.prepare(function(err) { txService.prepare(function(err) {
if (err) { if (err) {
self.error = err; self.error = err;
return; return;
@ -174,7 +174,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
return; return;
} }
txSignService.sign(txp, function(err, txp) { txService.sign(txp, function(err, txp) {
if (err) { if (err) {
self.loading = null; self.loading = null;
self.error = err; self.error = err;

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txSignService) { angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txService) {
var self = this; var self = this;
window.ignoreMobilePause = false; window.ignoreMobilePause = false;
@ -324,7 +324,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.error = null; $scope.error = null;
$scope.loading = true; $scope.loading = true;
txSignService.prepareAndSignAndBroadcast(txp, { txService.prepareAndSignAndBroadcast(txp, {
reporterFn: self.setOngoingProcess.bind(self) reporterFn: self.setOngoingProcess.bind(self)
}, function(err, txp) { }, function(err, txp) {
$scope.loading = false; $scope.loading = false;
@ -818,7 +818,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}; };
self.setOngoingProcess(gettextCatalog.getString('Creating transaction')); self.setOngoingProcess(gettextCatalog.getString('Creating transaction'));
txSignService.createTx(opts, function(err, txp) { txService.createTx(opts, function(err, txp) {
self.setOngoingProcess(); self.setOngoingProcess();
if (err) { if (err) {
return self.setSendError(err); return self.setSendError(err);
@ -845,12 +845,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.acceptTx = function(txp) { this.acceptTx = function(txp) {
var self = this; var self = this;
txSignService.prepare(function(err) { txService.prepare(function(err) {
if (err) { if (err) {
return self.setSendError(err); return self.setSendError(err);
} }
self.setOngoingProcess(gettextCatalog.getString('Sending transaction')); self.setOngoingProcess(gettextCatalog.getString('Sending transaction'));
txSignService.publishTx(txp, function(err, txpPublished) { txService.publishTx(txp, function(err, txpPublished) {
if (err) { if (err) {
self.setOngoingProcess(); self.setOngoingProcess();
self.setSendError(err); self.setSendError(err);
@ -864,7 +864,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.prepareSignAndBroadcastTx = function(txp) { this.prepareSignAndBroadcastTx = function(txp) {
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
var self = this; var self = this;
txSignService.prepareAndSignAndBroadcast(txp, { txService.prepareAndSignAndBroadcast(txp, {
reporterFn: self.setOngoingProcess.bind(self) reporterFn: self.setOngoingProcess.bind(self)
}, function(err, txp) { }, function(err, txp) {
self.resetForm(); self.resetForm();

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.services').factory('txSignService', function($rootScope, profileService, gettextCatalog, lodash, trezor, ledger, configService, bwsError, $log, feeService) { angular.module('copayApp.services').factory('txService', function($rootScope, profileService, gettextCatalog, lodash, trezor, ledger, configService, bwsError, $log, feeService) {
var root = {}; var root = {};
var reportSigningStatus = function(opts) { var reportSigningStatus = function(opts) {