paypro: fix mock server to handle txs as buffers when browserified. tests passing in browser.

This commit is contained in:
Christopher Jeffrey 2014-08-06 13:17:18 -07:00 committed by Manuel Araoz
commit 8bebbe8ec6

View file

@ -256,6 +256,7 @@ function startServer(cb) {
res.headers['Content-Transfer-Encoding'] = 'binary';
transactions = transactions.map(function(tx) {
tx.buffer = new Buffer(new Uint8Array(tx.buffer));
tx.buffer = tx.buffer.slice(tx.offset, tx.limit);
var ptx = new bitcore.Transaction();
ptx.parse(tx.buffer);