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.getTransaction =
|
||||||
Bitcoin.prototype.getTx = function(txid, blockhash, callback) {
|
Bitcoin.prototype.getTx = function(txid, blockhash, callback) {
|
||||||
var traverse = false;
|
var traverse = true;
|
||||||
if (typeof txid === 'object') {
|
if (typeof txid === 'object' && txid) {
|
||||||
var options = txid;
|
var options = txid;
|
||||||
callback = blockhash;
|
callback = blockhash;
|
||||||
txid = options.txid || options.tx || options.txhash || options.id || options.hash;
|
txid = options.txid || options.tx || options.txhash || options.id || options.hash;
|
||||||
blockhash = options.blockhash || options.block;
|
blockhash = options.blockhash || options.block;
|
||||||
traverse = options.traverse;
|
traverse = options.traverse !== false;
|
||||||
}
|
}
|
||||||
if (typeof blockhash === 'function') {
|
if (typeof blockhash === 'function') {
|
||||||
callback = blockhash;
|
callback = blockhash;
|
||||||
|
|
Loading…
Reference in New Issue