getChainId
Gets the chain ID if its set, otherwise gets the chain ID from the access node
Import
You can import the entire package and access the function:
_10import * as fcl from "@onflow/fcl-react-native"_10_10fcl.getChainId(opts)
Or import directly the specific function:
_10import { getChainId } from "@onflow/fcl-react-native"_10_10getChainId(opts)
Usage
_10// returns "testnet"_10getChainId()
Parameters
opts
(optional)
- Type:
_10export interface GetChainIdOptions {_10 node?: unknown_10 enableRequestLogging?: boolean_10 [key: string]: any_10}
- Description: Optional parameters
Returns
Promise<string>
The chain ID of the access node