From bdb0ac2387244b94fe7cbef3199feb3352f6b0a3 Mon Sep 17 00:00:00 2001 From: TheGreatAxios Date: Fri, 14 Feb 2025 09:17:49 +0000 Subject: [PATCH] Wrap getChainId with useQuantity to strip leading non 0x zeroes --- src/core/chain.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/chain.ts b/src/core/chain.ts index fe124c99..7b8f0a8b 100644 --- a/src/core/chain.ts +++ b/src/core/chain.ts @@ -21,7 +21,7 @@ * @copyright SKALE Labs 2023-Present */ -import { id, toBeHex } from 'ethers' +import { id, toBeHex, toQuantity } from 'ethers' import { type types } from '@/core' export const HTTPS_PREFIX = 'https://' @@ -62,7 +62,7 @@ export function getFsUrl(proxyUrl: string, schainName: string, prefix: string): } export function getChainId(schainName: string): string { - return toBeHex(id(schainName).substring(0, 15)) + return toQuantity(toBeHex(id(schainName).substring(0, 15))) } export function getChainShortAlias(meta: types.ChainsMetadataMap, name: string): string {