wallet test passings

This commit is contained in:
Matias Alejo Garcia 2014-08-01 10:51:46 -03:00
commit dc3bbb8859
4 changed files with 23 additions and 70 deletions

View file

@ -53,14 +53,9 @@ TxProposal.prototype.setSent = function(sentTxid) {
};
TxProposal.fromObj = function(o, forceOpts) {
console.log('[TxProposal.js.56]'); //TODO
preconditions.checkArgument(o.builderObj);
console.log('[TxProposal.js.59]'); //TODO
delete o['builder'];
console.log('[TxProposal.js.62]'); //TODO
try {
// force opts is requested.
for (var k in forceOpts) {
@ -69,19 +64,16 @@ TxProposal.fromObj = function(o, forceOpts) {
o.builder = TransactionBuilder.fromObj(o.builderObj);
} catch (e) {
console.log('[TxProposal.js.71]'); //TODO
if (!o.version) {
o.builder = new BuilderMockV0(o.builderObj);
o.readonly = 1;
};
}
console.log('[TxProposal.js.78]', o); //TODO
var t = new TxProposal(o);
t._check();
t._updateSignedBy();
console.log('[TxProposal.js.78]'); //TODO
return t;
};
@ -125,7 +117,6 @@ TxProposal._verifySignatures = function(inKeys, scriptSig, txSigHash) {
};
TxProposal._infoFromRedeemScript = function(s) {
console.log('[TxProposal.js.127]',s.getBuffer().toString('hex')); //TODO
var redeemScript = new Script(s.chunks[s.chunks.length - 1]);
if (!redeemScript)
throw new Error('Bad scriptSig (no redeemscript)');

View file

@ -135,7 +135,6 @@ Wallet.prototype._handleTxProposal = function(senderId, data) {
try {
mergeInfo = this.txProposals.mergeFromObj(data.txProposal, senderId, Wallet.builderOpts);
} catch (e) {
console.log('[Wallet.js.141]',e); //TODO
var corruptEvent = {
type: 'corrupt',
cId: senderId,