Skip to content

Commit e65a28e

Browse files
committed
lint
1 parent 96df9e7 commit e65a28e

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/helpers/accountIndex.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ export type ParsedAccountIndexConfig =
3232
| Readonly<{ mode: "sequential"; start: number; count: number }>
3333
| Readonly<{ mode: "random"; start: number; count: number; seed?: number }>;
3434

35-
export function parseAccountIndexConfig(rawVars: unknown): ParsedAccountIndexConfig {
35+
export function parseAccountIndexConfig(
36+
rawVars: unknown
37+
): ParsedAccountIndexConfig {
3638
const vars = requireDict(rawVars, "context.vars");
3739

3840
const modeRaw = requireNonEmptyString(vars.ACCOUNT_MODE, "ACCOUNT_MODE");
39-
if (modeRaw !== "byIndex" && modeRaw !== "sequential" && modeRaw !== "random") {
41+
if (
42+
modeRaw !== "byIndex" &&
43+
modeRaw !== "sequential" &&
44+
modeRaw !== "random"
45+
) {
4046
throw new Error(
4147
`Missing or invalid ACCOUNT_MODE: ${modeRaw} (expected 'byIndex', 'sequential', or 'random')`
4248
);
@@ -47,7 +53,11 @@ export function parseAccountIndexConfig(rawVars: unknown): ParsedAccountIndexCon
4753
if (vars.accountIndex !== undefined) {
4854
const idx = requireInteger(vars.accountIndex, "accountIndex");
4955
if (idx < 0) throw new Error("accountIndex must be >= 0");
50-
return { mode: "byIndex", accountIndex: idx, source: "payload:accountIndex" };
56+
return {
57+
mode: "byIndex",
58+
accountIndex: idx,
59+
source: "payload:accountIndex",
60+
};
5161
}
5262

5363
const idx = requireInteger(vars.ACCOUNT_INDEX, "ACCOUNT_INDEX");
@@ -70,7 +80,10 @@ export function parseAccountIndexConfig(rawVars: unknown): ParsedAccountIndexCon
7080

7181
// random
7282
if (vars.ACCOUNT_RANDOM_SEED !== undefined) {
73-
const seed = requireInteger(vars.ACCOUNT_RANDOM_SEED, "ACCOUNT_RANDOM_SEED");
83+
const seed = requireInteger(
84+
vars.ACCOUNT_RANDOM_SEED,
85+
"ACCOUNT_RANDOM_SEED"
86+
);
7487
return { mode: "random", start, count, seed };
7588
}
7689
return { mode: "random", start, count };

src/processors/siwe-bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { getLogger } from "../log.js";
22
import {
3+
AccountIndexSelection,
34
cacheAccountIndex,
45
selectAccountIndex,
56
} from "../helpers/accountIndex.js";

0 commit comments

Comments
 (0)