mirror of https://github.com/BTCPrivate/copay.git
trying to get past intermediate screen
This commit is contained in:
parent
7e286d88d8
commit
cae11776ac
|
@ -377,6 +377,7 @@ PublicKeyRing.prototype._checkInPKR = function(inPKR, ignoreId) {
|
|||
|
||||
|
||||
PublicKeyRing.prototype._mergePubkeys = function(inPKR) {
|
||||
alert('merge pubkeys');
|
||||
var self = this;
|
||||
|
||||
var hasChanged = false;
|
||||
|
|
|
@ -318,15 +318,19 @@ Wallet.prototype._handleAddressBook = function(senderId, data, isInbound) {
|
|||
|
||||
Wallet.prototype._handleData = function(senderId, data, isInbound) {
|
||||
|
||||
|
||||
alert(JSON.stringify(data));
|
||||
if (data.type !== 'walletId' && this.id !== data.walletId) {
|
||||
this.emit('badMessage', senderId);
|
||||
this.log('badMessage FROM:', senderId);
|
||||
alert('fuck');
|
||||
return;
|
||||
}
|
||||
|
||||
switch (data.type) {
|
||||
// This handler is repeaded on WalletFactory (#join). TODO
|
||||
case 'walletId':
|
||||
alert('walletID received');
|
||||
this.sendWalletReady(senderId);
|
||||
break;
|
||||
case 'walletReady':
|
||||
|
@ -356,7 +360,6 @@ Wallet.prototype._handleData = function(senderId, data, isInbound) {
|
|||
};
|
||||
|
||||
Wallet.prototype._handleConnect = function(newCopayerId) {
|
||||
alert(newCopayerId);
|
||||
if (newCopayerId) {
|
||||
this.log('#### Setting new COPAYER:', newCopayerId);
|
||||
this.sendWalletId(newCopayerId);
|
||||
|
@ -1727,7 +1730,7 @@ Wallet.prototype.indexDiscovery = function(start, change, copayerIndex, gap, cb)
|
|||
function _while() {
|
||||
return hasActivity;
|
||||
},
|
||||
function _finnaly(err) {
|
||||
function _finally(err) {
|
||||
if (err) return cb(err);
|
||||
cb(null, lastActive);
|
||||
}
|
||||
|
|
|
@ -199,14 +199,11 @@ Network.prototype._onMessage = function(enc) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.allowedCopayerIds && !this.allowedCopayerIds[payload.copayerId]) {
|
||||
this._deletePeer(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (!this.copayerForPeer[sender] || (isInbound && !this.isInboundPeerAuth[sender])) {
|
||||
|
@ -215,6 +212,9 @@ Network.prototype._onMessage = function(enc) {
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
console.log('receiving '+JSON.stringify(payload));
|
||||
|
||||
var self = this;
|
||||
switch (payload.type) {
|
||||
case 'disconnect':
|
||||
|
@ -352,8 +352,7 @@ Network.prototype.send = function(copayerIds, payload, cb) {
|
|||
};
|
||||
var copayerIdBuf = new Buffer(copayerId, 'hex');
|
||||
var message = AuthMessage.encode(copayerIdBuf, self.getKey(), payload, opts);
|
||||
console.log(JSON.stringify(payload));
|
||||
console.log(JSON.stringify(message));
|
||||
console.log('sending '+JSON.stringify(payload));
|
||||
self.socket.emit('message', message);
|
||||
});
|
||||
if (typeof cb === 'function') cb();
|
||||
|
|
Loading…
Reference in New Issue