Skip to content

Commit 9207dea

Browse files
committed
fix: improve bad tokens message when HF=0
1 parent 57ae166 commit 9207dea

File tree

4 files changed

+579
-550
lines changed

4 files changed

+579
-550
lines changed

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
33
"extends": ["@gearbox-protocol/biome-config"],
44
"vcs": {
55
"enabled": true,

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
"pino-pretty": "^13.1.3"
2222
},
2323
"devDependencies": {
24-
"@aws-sdk/client-s3": "^3.958.0",
25-
"@biomejs/biome": "^2.3.10",
24+
"@aws-sdk/client-s3": "^3.965.0",
25+
"@biomejs/biome": "^2.3.11",
2626
"@commander-js/extra-typings": "^14.0.0",
27-
"@commitlint/cli": "^20.2.0",
28-
"@commitlint/config-conventional": "^20.2.0",
29-
"@gearbox-protocol/biome-config": "^1.0.16",
30-
"@gearbox-protocol/cli-utils": "^5.65.2",
27+
"@commitlint/cli": "^20.3.1",
28+
"@commitlint/config-conventional": "^20.3.1",
29+
"@gearbox-protocol/biome-config": "^1.0.17",
30+
"@gearbox-protocol/cli-utils": "^5.65.4",
3131
"@gearbox-protocol/liquidator-contracts": "^1.36.0-experimental.67",
3232
"@gearbox-protocol/liquidator-v2-contracts": "^2.4.0",
33-
"@gearbox-protocol/sdk": "12.3.7",
33+
"@gearbox-protocol/sdk": "12.3.13",
3434
"@gearbox-protocol/types": "^1.14.8",
3535
"@types/node": "^25.0.3",
36-
"@uniswap/sdk-core": "^7.10.0",
36+
"@uniswap/sdk-core": "^7.10.1",
3737
"@uniswap/v3-sdk": "^3.27.0",
3838
"@vlad-yakovlev/telegram-md": "^2.1.0",
3939
"abitype": "^1.2.3",
@@ -49,9 +49,9 @@
4949
"pino": "^10.1.0",
5050
"tsx": "4.21.0",
5151
"typescript": "^5.9.3",
52-
"viem": "^2.43.3",
52+
"viem": "^2.43.5",
5353
"vitest": "^4.0.16",
54-
"zod": "^4.2.1"
54+
"zod": "^4.3.5"
5555
},
5656
"commitlint": {
5757
"extends": [

src/services/Scanner.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,19 +260,18 @@ export class Scanner {
260260
const badTokens = new AddressSet();
261261
for (const ca of zeroHFAccs) {
262262
for (const token of ca.tokens) {
263-
if (!token.success) {
263+
if (token.balance > 10n) {
264264
badTokens.add(token.token);
265265
}
266266
}
267267
}
268-
this.log.warn(
269-
`found ${zeroHFAccs.length} accounts with HF=0 and ${badTokens.size} bad tokens on second attempt skipping them`,
270-
);
271268
const badTokensStr = badTokens
272269
.asArray()
273270
.map(t => this.caService.sdk.tokensMeta.get(t)?.symbol ?? t)
274271
.join(", ");
275-
this.log.warn(`bad tokens: ${badTokensStr}`);
272+
this.log.warn(
273+
`found ${zeroHFAccs.length} accounts with HF=0 and ${badTokens.size} bad tokens: ${badTokensStr}`,
274+
);
276275
this.#notifyOnZeroHFAccounts(zeroHFAccs.length, badTokensStr);
277276
}
278277
}

0 commit comments

Comments
 (0)