From bfb7477f1a90f13606668f852bd457acab18e472 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 4 Aug 2014 10:41:35 -0700 Subject: [PATCH] paypro: add notification for payment ACK. --- js/controllers/send.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index a190ad269..88c3101b7 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -332,11 +332,25 @@ angular.module('copayApp.controllers').controller('SendController', $scope.loading = true; $rootScope.txAlertCount = 0; var w = $rootScope.wallet; - w.sendTx(ntxid, function(txid) { + w.sendTx(ntxid, function(txid, ca) { if (!txid) { notification.error('Error', 'There was an error sending the transaction'); } else { - notification.success('Transaction broadcast', 'Transaction id: '+txid); + if (!ca) { + notification.success('Transaction broadcast', 'Transaction id: '+txid); + } else { + var txp = w.txProposals.txps[ntxid]; + var merchantData = txp.merchant; + var message = 'Transaction ID: ' + txid; + if (ca) { + message += '\nThis payment protocol transaction' + + ' has been verified through ' + ca + '.'; + } + if (merchantData) { + message += '\nFor merchant: ' + merchantData.pr.pd.payment_url; + } + notification.success('Transaction sent', message); + } } if (cb) return cb();