Browse Source

proposal header utility needs separate args for simple proposals

activeAddress
Gregg Zigler 10 years ago
parent
commit
a6f2b70ef2
  1. 32
      test/integration/server.js

32
test/integration/server.js

@ -221,22 +221,22 @@ helpers.createProposalOpts = function(type, outputs, message, signingKey, feePer
};
if (feePerKb) opts.feePerKb = feePerKb;
switch (type) {
case Model.TxProposal.Types.SIMPLE:
opts.toAddress = outputs[0].toAddress;
opts.amount = outputs[0].amount;
break;
case Model.TxProposal.Types.MULTIPLEOUTPUTS:
opts.outputs = outputs;
break;
var hash;
if (type == Model.TxProposal.Types.SIMPLE) {
opts.toAddress = outputs[0].toAddress;
opts.amount = outputs[0].amount;
hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount,
opts.message, opts.payProUrl);
}
else if (type == Model.TxProposal.Types.MULTIPLEOUTPUTS) {
opts.outputs = outputs;
var header = {
outputs: outputs,
message: opts.message,
payProUrl: opts.payProUrl
};
hash = WalletUtils.getProposalHash(header);
}
var header = {
outputs: outputs,
message: opts.message,
payProUrl: opts.payProUrl
};
var hash = WalletUtils.getProposalHash(header);
try {
opts.proposalSignature = WalletUtils.signMessage(hash, signingKey);
@ -618,7 +618,7 @@ describe('Wallet service', function() {
spanish.from.should.equal('bws@dummy.net');
spanish.subject.should.contain('Nuevo pago recibido');
spanish.text.should.contain(wallet.name);
spanish.text.should.contain('0.123 BTC');
spanish.text.should.contain('0.123');
var english = _.find(emails, {
to: 'copayer2@domain.com'
});

Loading…
Cancel
Save