fix getTx traverse.

This commit is contained in:
Christopher Jeffrey 2014-12-08 12:41:51 -08:00
parent 72342c0cdb
commit e1bb7bb666
1 changed files with 3 additions and 3 deletions

View File

@ -380,13 +380,13 @@ Bitcoin.prototype.getBlockHeight = function(height, callback) {
Bitcoin.prototype.getTransaction =
Bitcoin.prototype.getTx = function(txid, blockhash, callback) {
var traverse = false;
if (typeof txid === 'object') {
var traverse = true;
if (typeof txid === 'object' && txid) {
var options = txid;
callback = blockhash;
txid = options.txid || options.tx || options.txhash || options.id || options.hash;
blockhash = options.blockhash || options.block;
traverse = options.traverse;
traverse = options.traverse !== false;
}
if (typeof blockhash === 'function') {
callback = blockhash;