From ae08d5611a146d7df0439f47429759c10a756028 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 25 Jul 2014 11:05:10 -0300 Subject: [PATCH] fix test / id name --- js/models/core/TxProposals.js | 2 +- test/test.TxProposals.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/models/core/TxProposals.js b/js/models/core/TxProposals.js index 32cc30f94..a6f696961 100644 --- a/js/models/core/TxProposals.js +++ b/js/models/core/TxProposals.js @@ -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; } diff --git a/test/test.TxProposals.js b/test/test.TxProposals.js index 23c71fc79..9b5e51c06 100644 --- a/test/test.TxProposals.js +++ b/test/test.TxProposals.js @@ -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);