paypro: use server outputs for creating txs again.
This commit is contained in:
parent
052e2522be
commit
f20836a24c
2 changed files with 29 additions and 29 deletions
|
|
@ -1161,15 +1161,15 @@ Wallet.prototype.createPaymentTxSync = function(options, merchantData, unspent)
|
||||||
.setUnspent(unspent)
|
.setUnspent(unspent)
|
||||||
.setOutputs(outs);
|
.setOutputs(outs);
|
||||||
|
|
||||||
// merchantData.pr.pd.outputs.forEach(function(output, i) {
|
merchantData.pr.pd.outputs.forEach(function(output, i) {
|
||||||
// var script = {
|
var script = {
|
||||||
// offset: output.script.offset,
|
offset: output.script.offset,
|
||||||
// limit: output.script.limit,
|
limit: output.script.limit,
|
||||||
// buffer: new Buffer(output.script.buffer, 'hex')
|
buffer: new Buffer(output.script.buffer, 'hex')
|
||||||
// };
|
};
|
||||||
// var s = script.buffer.slice(script.offset, script.limit);
|
var s = script.buffer.slice(script.offset, script.limit);
|
||||||
// b.tx.outs[i].s = s;
|
b.tx.outs[i].s = s;
|
||||||
// });
|
});
|
||||||
|
|
||||||
var selectedUtxos = b.getSelectedUnspent();
|
var selectedUtxos = b.getSelectedUnspent();
|
||||||
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
||||||
|
|
@ -1289,10 +1289,10 @@ Wallet.prototype.verifyPaymentRequest = function(ntxid) {
|
||||||
var av = tx.outs[i].v;
|
var av = tx.outs[i].v;
|
||||||
|
|
||||||
// Actual script
|
// Actual script
|
||||||
// var as = tx.outs[i].s;
|
var as = tx.outs[i].s;
|
||||||
|
|
||||||
// XXX allow changing of script as long as address is same
|
// XXX allow changing of script as long as address is same
|
||||||
var as = es;
|
// var as = es;
|
||||||
|
|
||||||
// XXX allow changing of script as long as address is same
|
// XXX allow changing of script as long as address is same
|
||||||
// var network = pd.get('network') === 'main' ? 'livenet' : 'testnet';
|
// var network = pd.get('network') === 'main' ? 'livenet' : 'testnet';
|
||||||
|
|
|
||||||
|
|
@ -271,15 +271,15 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
.setUnspent(unspentTest)
|
.setUnspent(unspentTest)
|
||||||
.setOutputs(outs);
|
.setOutputs(outs);
|
||||||
|
|
||||||
// outputs.forEach(function(output, i) {
|
outputs.forEach(function(output, i) {
|
||||||
// var script = {
|
var script = {
|
||||||
// offset: output.get('script').offset,
|
offset: output.get('script').offset,
|
||||||
// limit: output.get('script').limit,
|
limit: output.get('script').limit,
|
||||||
// buffer: output.get('script').buffer
|
buffer: output.get('script').buffer
|
||||||
// };
|
};
|
||||||
// var s = script.buffer.slice(script.offset, script.limit);
|
var s = script.buffer.slice(script.offset, script.limit);
|
||||||
// b.tx.outs[i].s = s;
|
b.tx.outs[i].s = s;
|
||||||
// });
|
});
|
||||||
|
|
||||||
var selectedUtxos = b.getSelectedUnspent();
|
var selectedUtxos = b.getSelectedUnspent();
|
||||||
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
||||||
|
|
@ -507,15 +507,15 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
.setUnspent(unspentTest)
|
.setUnspent(unspentTest)
|
||||||
.setOutputs(outs);
|
.setOutputs(outs);
|
||||||
|
|
||||||
// outputs.forEach(function(output, i) {
|
outputs.forEach(function(output, i) {
|
||||||
// var script = {
|
var script = {
|
||||||
// offset: output.get('script').offset,
|
offset: output.get('script').offset,
|
||||||
// limit: output.get('script').limit,
|
limit: output.get('script').limit,
|
||||||
// buffer: output.get('script').buffer
|
buffer: output.get('script').buffer
|
||||||
// };
|
};
|
||||||
// var s = script.buffer.slice(script.offset, script.limit);
|
var s = script.buffer.slice(script.offset, script.limit);
|
||||||
// b.tx.outs[i].s = s;
|
b.tx.outs[i].s = s;
|
||||||
// });
|
});
|
||||||
|
|
||||||
var selectedUtxos = b.getSelectedUnspent();
|
var selectedUtxos = b.getSelectedUnspent();
|
||||||
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue