fix signed message
This commit is contained in:
parent
45fd46e3bc
commit
74593fe778
2 changed files with 7 additions and 7 deletions
|
|
@ -222,12 +222,12 @@ Wallet.prototype._processProposalEvents = function(senderId, m) {
|
||||||
if (m.new) {
|
if (m.new) {
|
||||||
ev = {
|
ev = {
|
||||||
type: 'new',
|
type: 'new',
|
||||||
cid: senderId
|
cId: senderId
|
||||||
}
|
}
|
||||||
} else if (m.newCopayer) {
|
} else if (m.newCopayer.length) {
|
||||||
ev = {
|
ev = {
|
||||||
type: 'signed',
|
type: 'signed',
|
||||||
cid: m.newCopayer
|
cId: m.newCopayer[0]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -236,7 +236,6 @@ Wallet.prototype._processProposalEvents = function(senderId, m) {
|
||||||
cId: senderId,
|
cId: senderId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev)
|
if (ev)
|
||||||
this.emit('txProposalEvent', ev);
|
this.emit('txProposalEvent', ev);
|
||||||
};
|
};
|
||||||
|
|
@ -328,10 +327,10 @@ Wallet.prototype._onTxProposal = function(senderId, data) {
|
||||||
try {
|
try {
|
||||||
m = this.txProposals.merge(data.txProposal, Wallet.builderOpts);
|
m = this.txProposals.merge(data.txProposal, Wallet.builderOpts);
|
||||||
var keyMap = this._getKeyMap(m.txp);
|
var keyMap = this._getKeyMap(m.txp);
|
||||||
ret.newCopayer = m.txp.setCopayers(senderId, keyMap);
|
m.newCopayer = m.txp.setCopayers(senderId, keyMap);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.debug('Corrupt TX proposal received from:', senderId, e);
|
log.error('Corrupt TX proposal received from:', senderId, e);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m) {
|
if (m) {
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ angular.module('copayApp.services')
|
||||||
}, 3000);
|
}, 3000);
|
||||||
});
|
});
|
||||||
w.on('txProposalEvent', function(e) {
|
w.on('txProposalEvent', function(e) {
|
||||||
|
|
||||||
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case 'signed':
|
case 'signed':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue