fix addr
This commit is contained in:
parent
255affe382
commit
fb05586c32
2 changed files with 2 additions and 22 deletions
|
|
@ -653,7 +653,6 @@ Wallet.prototype._setBlockchainListeners = function() {
|
||||||
this.blockchain.on('disconnect', self.emit.bind(self,'networkError'));
|
this.blockchain.on('disconnect', self.emit.bind(self,'networkError'));
|
||||||
|
|
||||||
this.blockchain.on('tx', function(tx) {
|
this.blockchain.on('tx', function(tx) {
|
||||||
console.log('[Wallet.js.655:tx:]',tx); //TODO
|
|
||||||
self.emit('tx', tx.address);
|
self.emit('tx', tx.address);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
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();
|
w.netStart();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO movie this to wallet
|
||||||
root.updateAddressList = function() {
|
root.updateAddressList = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
if (w && w.isReady())
|
if (w && w.isReady())
|
||||||
|
|
@ -293,9 +274,9 @@ angular.module('copayApp.services')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Move this to wallet model!
|
||||||
root.updateGlobalAddresses = function() {
|
root.updateGlobalAddresses = function() {
|
||||||
if (!$rootScope.wallet) return;
|
if (!$rootScope.wallet) return;
|
||||||
|
|
||||||
root.updateAddressList();
|
root.updateAddressList();
|
||||||
var currentAddrs = $rootScope.wallet.blockchain.getSubscriptions();
|
var currentAddrs = $rootScope.wallet.blockchain.getSubscriptions();
|
||||||
var allAddrs = $rootScope.addrInfos;
|
var allAddrs = $rootScope.addrInfos;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue