diff --git a/public/views/includes/confirm-tx.html b/public/views/includes/confirm-tx.html
index 3cadb0ca0..9e3425b14 100644
--- a/public/views/includes/confirm-tx.html
+++ b/public/views/includes/confirm-tx.html
@@ -32,7 +32,7 @@
ng-click="confirm.accept(index.confirmTx.callback)"
class="small m10b round expand"
ng-style="{'background-color':index.backgroundColor}" translate>
- Accept
+ Confirm
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js
index 1831335bb..606702a97 100644
--- a/src/js/controllers/walletHome.js
+++ b/src/js/controllers/walletHome.js
@@ -923,7 +923,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
return;
} else {
$rootScope.$emit('Local/NeedsConfirmation', txp, function(accept) {
- if (accept) self.acceptTx(txp);
+ if (accept) self.confirmTx(txp);
else self.resetForm();
});
}
@@ -932,7 +932,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}, 100);
};
- this.acceptTx = function(txp) {
+ this.confirmTx = function(txp) {
var self = this;
txService.prepare(function(err) {
if (err) {
@@ -944,35 +944,29 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
self.setOngoingProcess();
self.setSendError(err);
} else {
- self.prepareSignAndBroadcastTx(txpPublished);
+ txService.signAndBroadcast(txpPublished, {
+ reporterFn: self.setOngoingProcess.bind(self)
+ }, function(err, txp) {
+ self.resetForm();
+
+ if (err) {
+ self.error = err.message ? err.message : gettext('The payment was created but could not be completed. Please try again from home screen');
+ $scope.$emit('Local/TxProposalAction');
+ $timeout(function() {
+ $scope.$digest();
+ }, 1);
+ } else {
+ go.walletHome();
+ txStatus.notify(txp, function() {
+ $scope.$emit('Local/TxProposalAction', txp.status == 'broadcasted');
+ });
+ }
+ });
}
});
});
};
- this.prepareSignAndBroadcastTx = function(txp) {
- var fc = profileService.focusedClient;
- var self = this;
- txService.prepareAndSignAndBroadcast(txp, {
- reporterFn: self.setOngoingProcess.bind(self)
- }, function(err, txp) {
- self.resetForm();
-
- if (err) {
- self.error = err.message ? err.message : gettext('The payment was created but could not be completed. Please try again from home screen');
- $scope.$emit('Local/TxProposalAction');
- $timeout(function() {
- $scope.$digest();
- }, 1);
- } else {
- go.walletHome();
- txStatus.notify(txp, function() {
- $scope.$emit('Local/TxProposalAction', txp.status == 'broadcasted');
- });
- }
- });
- };
-
this.setForm = function(to, amount, comment) {
var form = $scope.sendForm;
if (to) {