This commit is contained in:
Matias Alejo Garcia 2014-09-09 15:53:47 -03:00
commit fb05586c32
2 changed files with 2 additions and 22 deletions

View file

@ -653,7 +653,6 @@ Wallet.prototype._setBlockchainListeners = function() {
this.blockchain.on('disconnect', self.emit.bind(self,'networkError'));
this.blockchain.on('tx', function(tx) {
console.log('[Wallet.js.655:tx:]',tx); //TODO
self.emit('tx', tx.address);
});

View file

@ -144,26 +144,6 @@ angular.module('copayApp.services')
notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
}
});
$rootScope.$watch('receivedFund', function(receivedFund) {
if (receivedFund) {
var currentAddr;
for (var i = 0; i < $rootScope.addrInfos.length; i++) {
var addrinfo = $rootScope.addrInfos[i];
if (addrinfo.address.toString() == receivedFund[1] && !addrinfo.isChange) {
currentAddr = addrinfo.address.toString();
break;
}
}
if (currentAddr) {
//var beep = new Audio('sound/transaction.mp3');
notification.funds('Received fund', currentAddr, receivedFund);
//beep.play();
}
}
});
};
@ -175,6 +155,7 @@ angular.module('copayApp.services')
w.netStart();
};
// TODO movie this to wallet
root.updateAddressList = function() {
var w = $rootScope.wallet;
if (w && w.isReady())
@ -293,9 +274,9 @@ angular.module('copayApp.services')
});
}
// TODO Move this to wallet model!
root.updateGlobalAddresses = function() {
if (!$rootScope.wallet) return;
root.updateAddressList();
var currentAddrs = $rootScope.wallet.blockchain.getSubscriptions();
var allAddrs = $rootScope.addrInfos;