mirror of https://github.com/BTCPrivate/copay.git
Alert when incoming transaction (not proposal)
This commit is contained in:
parent
70cae4135f
commit
edb3e75800
|
@ -29,6 +29,12 @@ angular.module('copay.header').controller('HeaderController',
|
|||
}
|
||||
});
|
||||
|
||||
$rootScope.$watch('receivedFund', function(receivedFund) {
|
||||
if (receivedFund) {
|
||||
$notification.funds('Received fund', 'on ' + receivedFund[1], receivedFund);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.isActive = function(item) {
|
||||
if (item.link && item.link.replace('#','') == $location.path()) {
|
||||
return true;
|
||||
|
|
|
@ -192,6 +192,7 @@ angular.module('copay.controllerUtils')
|
|||
newAddrs.forEach(function(addr) {
|
||||
Socket.on(addr, function(txid) {
|
||||
console.log('Received!', txid);
|
||||
$rootScope.receivedFund = [txid, addr];
|
||||
root.updateBalance(function(){
|
||||
$rootScope.$digest();
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ angular.module('notifications', []).
|
|||
|
||||
var settings = {
|
||||
info: { duration: 5000, enabled: true },
|
||||
funds: { duration: 5000, enabled: true },
|
||||
warning: { duration: 5000, enabled: true },
|
||||
error: { duration: 5000, enabled: true },
|
||||
success: { duration: 5000, enabled: true },
|
||||
|
@ -115,6 +116,11 @@ angular.module('notifications', []).
|
|||
console.log(title, content);
|
||||
return this.awesomeNotify('info','loop', title, content, userData);
|
||||
},
|
||||
|
||||
funds: function(title, content, userData){
|
||||
console.log(title, content);
|
||||
return this.awesomeNotify('funds','bitcoin', title, content, userData);
|
||||
},
|
||||
|
||||
error: function(title, content, userData){
|
||||
return this.awesomeNotify('error', 'remove', title, content, userData);
|
||||
|
|
Loading…
Reference in New Issue