From 1e1ac82a14ccb8c640fab8fbc4e8eb68e25cd9aa Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Thu, 26 Jun 2014 17:56:34 -0300 Subject: [PATCH] remove flashmessages from transactions --- js/controllers/transactions.js | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index e4bffcc90..5efc0eb40 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -107,13 +107,11 @@ angular.module('copayApp.controllers').controller('TransactionsController', $rootScope.txAlertCount = 0; var w = $rootScope.wallet; w.sendTx(ntxid, function(txid) { - $rootScope.$flashMessage = txid ? { - type: 'success', - message: 'Transaction broadcasted. txid: ' + txid - } : { - type: 'error', - message: 'There was an error sending the Transaction' - }; + if (!txid) { + notification.error('Error', 'There was an error sending the transaction'); + } else { + notification.success('Transaction broadcast', 'Transaction id: '+txid); + } if (cb) return cb(); else $scope.update(); }); @@ -124,10 +122,7 @@ angular.module('copayApp.controllers').controller('TransactionsController', var w = $rootScope.wallet; w.sign(ntxid, function(ret) { if (!ret) { - $rootScope.$flashMessage = { - type: 'error', - message: 'There was an error signing the Transaction', - }; + notification.error('Error', 'There was an error signing the transaction'); $scope.update(); } else { var p = w.txProposals.getTxProposal(ntxid); @@ -180,10 +175,7 @@ angular.module('copayApp.controllers').controller('TransactionsController', $rootScope.txAlertCount = 0; var w = $rootScope.wallet; w.reject(ntxid); - $rootScope.$flashMessage = { - type: 'warning', - message: 'Transaction rejected by you' - }; + notification.warning('Transaction rejected', 'You rejected the transaction successfully'); $scope.loading = false; };