toJS property

JSSwitchChainParameters get toJS

Implementation

JSSwitchChainParameters get toJS {
  // According to wagmi docs, connector is optional for switchChain
  // If not provided, it will use the current connector
  return JSSwitchChainParameters(
    chainId: chainId.toJS,
    addEthereumChainParameter: addEthereumChainParameter != null
        ? UtilsJS.jsify(addEthereumChainParameter)
        : null,
    // Omit connector - let wagmi use the current connector
  );
}