Refactor loop to avoid passing index limit.
This commit is contained in:
parent
08fda5390a
commit
405199cfe3
@ -34,7 +34,7 @@ export class AccountIndex {
|
||||
lowest = 0;
|
||||
}
|
||||
const accounts: Array<string> = [];
|
||||
for (let i = count; i > lowest; i--) {
|
||||
for (let i = count - 1; i >= lowest; i--) {
|
||||
const account: string = await this.contract.methods.entry(i).call();
|
||||
accounts.push(account);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user