Skip to content

Commit

Permalink
fix: issue #398
Browse files Browse the repository at this point in the history
  • Loading branch information
stan committed Jul 13, 2023
1 parent 367475c commit 700d55b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/trx.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,12 @@ export default class Trx {
if (!utils.isInteger(start) || start < 0)
return callback('Invalid start of range provided');

if (!utils.isInteger(end) || end <= start)
if (!utils.isInteger(end) || end < start)
return callback('Invalid end of range provided');

if (end + 1 - start > 100)
return callback('Invalid range size, which should be no more than 100.');

this.tronWeb.fullNode.request('wallet/getblockbylimitnext', {
startNum: parseInt(start),
endNum: parseInt(end) + 1
Expand Down

0 comments on commit 700d55b

Please sign in to comment.