fix bad message from peer on walletId type

This commit is contained in:
Matias Alejo Garcia 2014-06-09 16:17:00 -03:00
commit eb5d9cd90a

View file

@ -131,8 +131,10 @@ Wallet.prototype._handleTxProposals = function(senderId, data, isInbound) {
};
Wallet.prototype._handleData = function(senderId, data, isInbound) {
// TODO check message signature
if (this.id !== data.walletId) {
if (data.type !== 'walletId' && this.id !== data.walletId) {
this.emit('badMessage', senderId);
this.log('badMessage FROM:', senderId); //TODO
return;