show memo in log

This commit is contained in:
Matias Alejo Garcia 2015-05-22 17:16:55 -03:00
commit 7cd8923e75
2 changed files with 15 additions and 6 deletions

View file

@ -16,7 +16,7 @@
"foundation-icon-fonts": "*", "foundation-icon-fonts": "*",
"ng-lodash": "~0.2.0", "ng-lodash": "~0.2.0",
"angular-moment": "~0.9.0", "angular-moment": "~0.9.0",
"angular-bitcore-wallet-client": "^0.0.22", "angular-bitcore-wallet-client": "^0.0.25",
"angular-ui-router": "~0.2.13", "angular-ui-router": "~0.2.13",
"qrcode-decoder-js": "*", "qrcode-decoder-js": "*",
"fastclick": "*", "fastclick": "*",

View file

@ -91,10 +91,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var parseError = function(err) { var parseError = function(err) {
if (err.message) { if (err.message) {
if (err.message.indexOf('CORS')>=0) { if (err.message.indexOf('CORS') >= 0) {
err.message = gettext('Could not connect wallet service. Check your Internet connexion and your wallet service configuration.'); err.message = gettext('Could not connect wallet service. Check your Internet connexion and your wallet service configuration.');
} }
if (err.message.indexOf('TIMEDOUT')>=0) { if (err.message.indexOf('TIMEDOUT') >= 0) {
err.message = gettext('Wallet service timed out. Check your Internet connexion and your wallet service configuration.'); err.message = gettext('Wallet service timed out. Check your Internet connexion and your wallet service configuration.');
} }
} }
@ -208,7 +208,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
if (txpHasRequiredSignatures) { if (txpHasRequiredSignatures) {
self.setOngoingProcess(gettext('Broadcasting transaction')); self.setOngoingProcess(gettext('Broadcasting transaction'));
$scope.loading = true; $scope.loading = true;
fc.broadcastTxProposal(txpsi, function(err, txpsb) { fc.broadcastTxProposal(txpsi, function(err, txpsb, memo) {
self.setOngoingProcess(); self.setOngoingProcess();
$scope.loading = false; $scope.loading = false;
if (err) { if (err) {
@ -216,6 +216,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.error = gettext('Could not broadcast transaction. Please try again.'); $scope.error = gettext('Could not broadcast transaction. Please try again.');
$scope.$digest(); $scope.$digest();
} else { } else {
if (memo)
$log.info(memo);
$modalInstance.close(txpsb); $modalInstance.close(txpsb);
} }
}); });
@ -274,7 +276,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.loading = true; $scope.loading = true;
$scope.error = null; $scope.error = null;
$timeout(function() { $timeout(function() {
fc.broadcastTxProposal(txp, function(err, txpb) { fc.broadcastTxProposal(txp, function(err, txpb, memo) {
self.setOngoingProcess(); self.setOngoingProcess();
$scope.loading = false; $scope.loading = false;
if (err) { if (err) {
@ -282,6 +284,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.error = err.message || gettext('Could not send transaction. Please try again.'); $scope.error = err.message || gettext('Could not send transaction. Please try again.');
$scope.$digest(); $scope.$digest();
} else { } else {
if (memo)
$log.info(memo);
$modalInstance.close(txpb); $modalInstance.close(txpb);
} }
}); });
@ -616,13 +621,17 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
if (signedTx.status == 'accepted') { if (signedTx.status == 'accepted') {
self.setOngoingProcess(gettext('Broadcasting transaction')); self.setOngoingProcess(gettext('Broadcasting transaction'));
fc.broadcastTxProposal(signedTx, function(err, btx) {
fc.broadcastTxProposal(signedTx, function(err, btx, memo) {
self.setOngoingProcess(); self.setOngoingProcess();
if (err) { if (err) {
$scope.error = gettext('Transaction not broadcasted. Please try again.'); $scope.error = gettext('Transaction not broadcasted. Please try again.');
$scope.$digest(); $scope.$digest();
return cb(err); return cb(err);
} }
if (memo)
$log.info(memo);
txStatus.notify(btx, function() { txStatus.notify(btx, function() {
$scope.$emit('Local/TxProposalAction'); $scope.$emit('Local/TxProposalAction');
return cb(); return cb();