diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 73fb086a6..86ada9890 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -1165,6 +1165,16 @@ Wallet.prototype.createPaymentTxSync = function(options, merchantData, unspent) .setUnspent(unspent) .setOutputs(outs); + // merchantData.pr.pd.outputs.forEach(function(output, i) { + // var script = { + // offset: output.script.offset, + // limit: output.script.limit, + // buffer: new Buffer(output.script.buffer, 'hex') + // }; + // var s = script.buffer.slice(script.offset, script.limit); + // b.tx.outs[i].s = s; + // }); + var selectedUtxos = b.getSelectedUnspent(); var inputChainPaths = selectedUtxos.map(function(utxo) { return pkr.pathForAddress(utxo.address); diff --git a/test/test.PayPro.js b/test/test.PayPro.js index a5e9186cb..d78ed883c 100644 --- a/test/test.PayPro.js +++ b/test/test.PayPro.js @@ -270,6 +270,16 @@ describe('PayPro (in Wallet) model', function() { .setUnspent(unspentTest) .setOutputs(outs); + // outputs.forEach(function(output, i) { + // var script = { + // offset: output.get('script').offset, + // limit: output.get('script').limit, + // buffer: output.get('script').buffer + // }; + // var s = script.buffer.slice(script.offset, script.limit); + // b.tx.outs[i].s = s; + // }); + var selectedUtxos = b.getSelectedUnspent(); var inputChainPaths = selectedUtxos.map(function(utxo) { return pkr.pathForAddress(utxo.address); @@ -496,6 +506,16 @@ describe('PayPro (in Wallet) model', function() { .setUnspent(unspentTest) .setOutputs(outs); + // outputs.forEach(function(output, i) { + // var script = { + // offset: output.get('script').offset, + // limit: output.get('script').limit, + // buffer: output.get('script').buffer + // }; + // var s = script.buffer.slice(script.offset, script.limit); + // b.tx.outs[i].s = s; + // }); + var selectedUtxos = b.getSelectedUnspent(); var inputChainPaths = selectedUtxos.map(function(utxo) { return pkr.pathForAddress(utxo.address);