diff --git a/lib/transactions.js b/lib/transactions.js index f16b681..72320b9 100644 --- a/lib/transactions.js +++ b/lib/transactions.js @@ -25,7 +25,7 @@ TxController.prototype.transaction = function(req, res, next, txid) { var self = this; this.node.getTransactionWithBlockInfo(txid, function(err, transaction) { - if (err && err instanceof self.node.errors.Transaction.NotFound) { + if (err && err.code === -5) { return common.handleErrors(null, res); } else if(err) { return common.handleErrors(err, res); @@ -193,7 +193,7 @@ TxController.prototype.rawTransaction = function(req, res, next, txid) { var self = this; this.node.getTransaction(txid, function(err, transaction) { - if (err && err instanceof self.node.errors.Transaction.NotFound) { + if (err && err.code === -5) { return common.handleErrors(null, res); } else if(err) { return common.handleErrors(err, res);