enhacements on notifications and balance updates

This commit is contained in:
Matias Alejo Garcia 2014-10-15 12:09:10 -03:00
commit 95e8a22c54
7 changed files with 73 additions and 74 deletions

View file

@ -294,13 +294,11 @@ Network.prototype.greet = function(copayerId, secretNumber) {
};
Network.prototype._addCopayerMap = function(peerId, copayerId) {
console.log('[Async.js.296:_addCopayerMap:]',peerId, copayerId); //TODO
if (!this.copayerForPeer[peerId]) {
if (Object.keys(this.copayerForPeer).length < this.maxPeers) {
this.copayerForPeer[peerId] = copayerId;
}
}
console.log('[Async.js.296:_addCopayerMap:]',this.copayerForPeer); //TODO
};
Network.prototype._setInboundPeerAuth = function(peerId) {
@ -376,7 +374,6 @@ Network.prototype.send = function(dest, payload, cb) {
dest = this.getCopayerIds();
payload.isBroadcast = 1;
}
console.log('[Async.js.374:dest:]',dest); //TODO
if (typeof dest === 'string')
dest = [dest];