add update on network events to txproposals
This commit is contained in:
parent
751d86e785
commit
e46901c369
3 changed files with 16 additions and 2 deletions
|
|
@ -60,6 +60,7 @@ Wallet.prototype._handlePublicKeyRing = function(senderId, data, isInbound) {
|
|||
this._lockIncomming();
|
||||
}
|
||||
}
|
||||
this.emit('publicKeyRingUpdated', this.publicKeyRing);
|
||||
this.store();
|
||||
};
|
||||
|
||||
|
|
@ -76,6 +77,7 @@ Wallet.prototype._handleTxProposals = function(senderId, data, isInbound) {
|
|||
recipients = null;
|
||||
this.sendTxProposals(recipients);
|
||||
}
|
||||
this.emit('txProposalsUpdated', this.txProposals);
|
||||
this.store();
|
||||
};
|
||||
|
||||
|
|
@ -242,7 +244,6 @@ Wallet.prototype.sendTxProposals = function(recipients) {
|
|||
txProposals: this.txProposals.toObj(),
|
||||
walletId: this.id,
|
||||
});
|
||||
this.emit('txProposalsUpdated', this.txProposals);
|
||||
};
|
||||
|
||||
Wallet.prototype.sendWalletReady = function(recipients) {
|
||||
|
|
@ -274,7 +275,6 @@ Wallet.prototype.sendPublicKeyRing = function(recipients) {
|
|||
publicKeyRing: this.publicKeyRing.toObj(),
|
||||
walletId: this.id,
|
||||
});
|
||||
this.emit('publicKeyRingUpdated', this.publicKeyRing);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ console.log('[WebRTC.js.161:payload:]',payload); //TODO
|
|||
}
|
||||
|
||||
var copayerIdBuf = new Buffer(this.copayerForPeer[peerId],'hex');
|
||||
|
||||
console.log('[WebRTC.js.204] sig:', sig); //TODO
|
||||
if (!bitcore.Message.verifyWithPubKey( copayerIdBuf, JSON.stringify(payload),
|
||||
new Buffer(sig,'hex'))) {
|
||||
console.log('[WebRTC.js.152] SIGNATURE VERIFICATION FAILED!!'); //TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue