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

Loading…
Cancel
Save