Merge pull request #495 from chjj/fix_paypro_example_sign
paypro: example - sign customer transaction after output scripts are altered
This commit is contained in:
commit
fa9aff55c0
|
@ -382,8 +382,7 @@ function createTX(outputs) {
|
|||
|
||||
var b = new bitcore.TransactionBuilder(opts)
|
||||
.setUnspent(unspent)
|
||||
.setOutputs(outs)
|
||||
.sign(keys);
|
||||
.setOutputs(outs);
|
||||
|
||||
outputs.forEach(function(output, i) {
|
||||
var script = {
|
||||
|
@ -396,6 +395,8 @@ function createTX(outputs) {
|
|||
b.tx.outs[i].s = s;
|
||||
});
|
||||
|
||||
b = b.sign(keys);
|
||||
|
||||
var tx = b.build();
|
||||
|
||||
print('');
|
||||
|
|
Loading…
Reference in New Issue