From 88ef07f740b6d162fd0c19ae37bb803e046b100a Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Mon, 18 Sep 2023 17:40:56 +0300 Subject: [PATCH] Set radix --- .eslintrc.cjs | 4 +--- src/submitters/auto-submitter.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 742623f..133f2fb 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -21,6 +21,7 @@ module.exports = { "no-console": "off", // Replaced with @typescript-eslint/no-shadow "no-shadow": "off", + "no-warning-comments": "warn", "object-curly-spacing": "error", "one-var": [ "error", @@ -31,9 +32,6 @@ module.exports = { "never" ], - "no-warning-comments": "warn", - "prefer-destructuring": "warn", - "radix": "warn", "sort-imports": "warn", "sort-keys": "warn" } diff --git a/src/submitters/auto-submitter.ts b/src/submitters/auto-submitter.ts index ad46a84..f527875 100644 --- a/src/submitters/auto-submitter.ts +++ b/src/submitters/auto-submitter.ts @@ -144,8 +144,12 @@ export class AutoSubmitter extends Submitter { } private static getMainnetChainId () { + const CHAIN_ID_RADIX = 10; if (process.env.MAINNET_CHAIN_ID) { - return Number.parseInt(process.env.MAINNET_CHAIN_ID); + return Number.parseInt( + process.env.MAINNET_CHAIN_ID, + CHAIN_ID_RADIX + ); } console.log(chalk.red("Set chainId of mainnet" + " to MAINNET_CHAIN_ID environment variable"));