Add user notifications on transaction signed and rejected events

This commit is contained in:
Yemel Jardi 2014-06-13 17:24:44 -03:00
commit 6ab77e8711
4 changed files with 53 additions and 20 deletions

View file

@ -122,6 +122,18 @@ angular.module('copayApp.services')
});
}, 3000);
});
w.on('txProposalEvent', function(e){
switch (e.type) {
case 'signed':
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
$notification.info('Transaction Update', 'A transaction was signed by ' + user);
break;
case 'rejected':
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
$notification.info('Transaction Update', 'A transaction was rejected by ' + user);
break;
}
});
w.on('connectionError', function(msg) {
root.onErrorDigest(null, msg);
});