fix getTx traverse.
This commit is contained in:
parent
72342c0cdb
commit
e1bb7bb666
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue