refactor test to use scripts

This commit is contained in:
Matias Alejo Garcia 2014-11-25 13:29:03 -03:00
commit 5681d8e87d

View file

@ -8,6 +8,7 @@ var TransactionBuilder = bitcore.TransactionBuilder;
var Transaction = bitcore.Transaction; var Transaction = bitcore.Transaction;
var Address = bitcore.Address; var Address = bitcore.Address;
var PayPro = bitcore.PayPro; var PayPro = bitcore.PayPro;
var Buffer = bitcore.Buffer;
function assertObjectEqual(a, b) { function assertObjectEqual(a, b) {
@ -2618,34 +2619,8 @@ PP.getRequest = function() {
// TODO use bitcore / script!! // TODO use bitcore / script!!
// a TxOut script where the payment should be sent. similar to OP_CHECKSIG // a TxOut script where the payment should be sent. similar to OP_CHECKSIG
po.set('script', new Buffer([ var addr = new bitcore.Address(PP.outs[0].address);
118, // OP_DUP po.set('script', addr.getScriptPubKey().getBuffer());
169, // OP_HASH160
76, // OP_PUSHDATA1
20, // number of bytes
55,
48,
254,
188,
186,
4,
186,
208,
205,
71,
108,
251,
130,
15,
156,
55,
215,
70,
111,
217,
136, // OP_EQUALVERIFY
172 // OP_CHECKSIG
]));
outputs.push(po.message); outputs.push(po.message);
}); });