Skip to content

Commit 5c755ed

Browse files
committed
fix: off by 1
1 parent bf3a4b3 commit 5c755ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/routes/faucets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export const FaucetRoutes: FastifyPluginAsync<
409409
}
410410
// Try with the next key. Wrap around the keys array if necessary.
411411
keyIndex++;
412-
if (keyIndex > STX_FAUCET_KEYS.length) keyIndex = 0;
412+
if (keyIndex >= STX_FAUCET_KEYS.length) keyIndex = 0;
413413
logger.warn(
414414
`StxFaucet transaction failed for sender ${senderAddress}, trying with next key: ${error}`
415415
);

0 commit comments

Comments
 (0)