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 authored and michalsmiarowski committed Jul 30, 2024
1 parent bddade4 commit 0a5d6dd
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 0a5d6dd

Please sign in to comment.