refactor tx proposal events
This commit is contained in:
parent
4841c2dc05
commit
6ce2667274
11 changed files with 201 additions and 248 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue