refactor tx proposal events

This commit is contained in:
Matias Alejo Garcia 2014-12-10 18:18:28 -03:00
commit 6ce2667274
11 changed files with 201 additions and 248 deletions

View file

@ -6,19 +6,16 @@ angular.module('copayApp.services').factory('txStatus', function($modal) {
root.notify = function(status) {
var msg;
if (status == copay.Wallet.TX_BROADCASTED)
msg = 'Transaction broadcasted!';
msg = 'Transaction broadcasted';
else if (status == copay.Wallet.TX_PROPOSAL_SENT)
msg = 'Transaction proposal created';
else if (status == copay.Wallet.TX_SIGNED)
msg = 'Transaction proposal was signed';
else if (status == copay.Wallet.TX_SIGNED_AND_BROADCASTED)
msg = 'Transaction signed and broadcasted!';
else if (status == 'txRejected')
msg = 'Transaction was rejected!';
msg = 'Transaction proposal signed';
else if (status == copay.Wallet.TX_REJECTED)
msg = 'Transaction was rejected';
if (msg)
root.openModal(msg);
return msg ? true : false;
};
root.openModal = function(statusStr) {