Skip to content

Commit

Permalink
fix formatting, remove unneeded unpipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Nagurny committed Jun 13, 2017
1 parent 46134e1 commit 325e170
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/services/wallet-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,10 @@ WalletService.prototype._endpointGetTransactions = function() {

var txid = self._encoding.decodeWalletTransactionKey(chunk).txid.toString('hex');

if (txid.length !== 64 || txid === '0000000000000000000000000000000000000000000000000000000000000000') {
if (txid.length !== 64 || txid === '0000000000000000000000000000000000000000000000000000000000000000') {
missingTxidCount++;
txStream.emit('error', new Error('Chunk: ' + chunk.toString('hex') + ' did not contain a txid.'));
return callback();
return callback();
}

self._getTransactionFromDb(options, txid, function(err, tx) {
Expand Down Expand Up @@ -756,10 +756,6 @@ WalletService.prototype._endpointGetTransactions = function() {
var encodingFn = self._encoding.encodeWalletTransactionKey.bind(self._encoding);
var dbStream = self.db.createKeyStream(self._getSearchParams(encodingFn, options));

dbStream.on('close', function() {
dbStream.unpipe();
});

dbStream.pipe(txStream).pipe(res);

});
Expand Down

0 comments on commit 325e170

Please sign in to comment.