paypro: fix mock server to handle txs as buffers when browserified. tests passing in browser.
This commit is contained in:
parent
f9bd8c3a04
commit
8bebbe8ec6
1 changed files with 1 additions and 0 deletions
|
|
@ -256,6 +256,7 @@ function startServer(cb) {
|
||||||
res.headers['Content-Transfer-Encoding'] = 'binary';
|
res.headers['Content-Transfer-Encoding'] = 'binary';
|
||||||
|
|
||||||
transactions = transactions.map(function(tx) {
|
transactions = transactions.map(function(tx) {
|
||||||
|
tx.buffer = new Buffer(new Uint8Array(tx.buffer));
|
||||||
tx.buffer = tx.buffer.slice(tx.offset, tx.limit);
|
tx.buffer = tx.buffer.slice(tx.offset, tx.limit);
|
||||||
var ptx = new bitcore.Transaction();
|
var ptx = new bitcore.Transaction();
|
||||||
ptx.parse(tx.buffer);
|
ptx.parse(tx.buffer);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue