fix test / id name

This commit is contained in:
Matias Alejo Garcia 2014-07-25 11:05:10 -03:00
parent 0e6b31b9cb
commit ae08d5611a
2 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,7 @@ TxProposals.fromObj = function(o) {
});
o.txps.forEach(function(o2) {
var t = TxProposal.fromObj(o2);
if (id) {
if (t.builder) {
var id = t.builder.build().getNormalizedHash().toString('hex');
ret.txps[id] = t;
}

View File

@ -615,6 +615,7 @@ describe('TxProposals model', function() {
var o2 = JSON.parse(JSON.stringify(o));
var w2 = TxProposals.fromObj(o2);
w2.walletId.should.equal(w.walletId);
var tx2 = w2.txps[ntxid].builder.build();
tx2.isComplete().should.equal(false);
tx2.countInputMissingSignatures(0).should.equal(2);