Skip to content

Commit

Permalink
refactor chain id validation to make it leaner
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrosaturnino committed Jul 29, 2024
1 parent c2acee5 commit 31f5245
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/web3/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ export const toHex = (value: string | number): string =>
export const isSameChainId = (
chainId1: string | number,
chainId2: string | number
): boolean => {
const chainId1Hex = toHex(chainId1)
const chainId2Hex = toHex(chainId2)

return chainId1Hex.toLowerCase() === chainId2Hex.toLowerCase()
}
): boolean => toHex(chainId1) === toHex(chainId2)

0 comments on commit 31f5245

Please sign in to comment.