diff --git a/lib/account.js b/lib/account.js index 9fbc8c29..5b5ccf32 100644 --- a/lib/account.js +++ b/lib/account.js @@ -82,16 +82,6 @@ module.exports = function(getRequest, apiKey) { apiKey }; - if (!startblock) { - startblock = 0; - } - queryObject.startblock = startblock; - - if (!endblock) { - endblock = 'latest'; - } - queryObject.endblock = endblock; - if (!sort) { sort = 'asc'; } @@ -101,6 +91,16 @@ module.exports = function(getRequest, apiKey) { queryObject.txhash = txhash; } else { queryObject.address = address; + + if (!startblock) { + startblock = 0; + } + queryObject.startblock = startblock; + + if (!endblock) { + endblock = 'latest'; + } + queryObject.endblock = endblock; } queryObject.txhash = txhash;