proposals with explicit type = simple need legacy header

This commit is contained in:
Gregg Zigler 2015-07-07 14:25:34 -07:00
parent 4edb212c49
commit 3df035c5d9
1 changed files with 2 additions and 1 deletions

View File

@ -903,9 +903,10 @@ WalletService.prototype.createTx = function(opts, cb) {
var copayer = wallet.getCopayer(self.copayerId); var copayer = wallet.getCopayer(self.copayerId);
var hash; var hash;
if (!opts.type) { if (!opts.type || opts.type == Model.TxProposal.Types.SIMPLE) {
hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount, opts.message, opts.payProUrl); hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount, opts.message, opts.payProUrl);
} else { } else {
// should match bwc api _computeProposalSignature
var header = { var header = {
outputs: _.map(opts.outputs, function(output) { outputs: _.map(opts.outputs, function(output) {
return _.pick(output, ['toAddress', 'amount', 'message']); return _.pick(output, ['toAddress', 'amount', 'message']);