-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lavinia Talpas
authored and
Lavinia Talpas
committed
Oct 31, 2024
1 parent
9f76b95
commit 45549aa
Showing
7 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
export const supportedChainIds = [80084, 80002]; // berachainTestnet: 80084, polygonAmoy: 80002 | ||
import { supportedChainIdsArray } from './types'; | ||
|
||
/** | ||
* Utility function to check if a chain ID is supported. | ||
* | ||
* @param chainId - The chain ID to check. | ||
* @returns A boolean indicating if the chain is supported. | ||
* | ||
* @param {number} chainId - The chain ID to check. | ||
* @returns {boolean} A boolean indicating if the chain is supported. | ||
*/ | ||
export const isChainSupported = (chainId) => supportedChainIds.includes(chainId); | ||
export const isChainSupported = (chainId) => supportedChainIdsArray.includes(chainId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
export const supportedChainIds = [80084, 80002]; // berachainTestnet: 80084, polygonAmoy: 80002 | ||
import { SupportedChainIds, supportedChainIdsArray } from './types'; | ||
|
||
/** | ||
* Utility function to check if a chain ID is supported. | ||
* | ||
* @param chainId - The chain ID to check. | ||
* @returns A boolean indicating if the chain is supported. | ||
*/ | ||
export const isChainSupported = (chainId: number): boolean => supportedChainIds.includes(chainId); | ||
export const isChainSupported = (chainId: number): chainId is SupportedChainIds => | ||
supportedChainIdsArray.includes(chainId as SupportedChainIds); |