Skip to content

Commit

Permalink
undo batching change
Browse files Browse the repository at this point in the history
  • Loading branch information
bergeron committed Feb 5, 2024
1 parent 7b066d6 commit 6550633
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/scripts/controllers/detect-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ export default class DetectTokensController extends StaticIntervalPollingControl
tokensToDetect.push(tokenAddress);
}
}
const sliceOfTokensToDetect = [];
for (let i = 0, size = 1000; i < tokensToDetect.length; i += size) {
sliceOfTokensToDetect.push(tokensToDetect.slice(i, i + size));
}
const sliceOfTokensToDetect = [
tokensToDetect.slice(0, 1000),
tokensToDetect.slice(1000, tokensToDetect.length - 1),
];
for (const tokensSlice of sliceOfTokensToDetect) {
let result;
try {
Expand Down

0 comments on commit 6550633

Please sign in to comment.