@orderly.network/react-app
is an application layer of the Orderly API. It is mainly responsible for rendering the UI, handling user interaction events, and completing trading actions. Therefore, it does not include built-in wallet connection functionality.
In places where wallet connection needs to be handled, @orderly.network/react-app
utilizes React’s context mechanism to obtain information about the currently connected wallet or call wallet connection functions provided by the context. To facilitate this, @orderly.network/react-app
defines a context named WalletConnectorContext
. Any component that implements the WalletConnectorContext.Provider
defined in WalletConnectorContextState
can serve as the wallet connection component for the app. Please refer to this link for more details.
WalletConnectorProvider
for wallet connection functionality:
network
(required) – e.g., mainnet
or testnet
. This determines the network used by wallets like Solana and Abstract.customChains
(optional) – Brokers can define which chains to display.termsOfUse
(optional) – URL for Terms of Use; if not provided, terms section won’t be shown.privyConfig
is not configured, the Privy connector will be disabled.wagmiConfig
is not configured, the Wagmi connector will be disabled.solanaConfig
is not configured, the Solana connector will be disabled.abstractConfig
is not configured, the Abstract Global Wallet connector will be disabled.privyConfig
, wagmiConfig
, or solanaConfig
must be provided.customChains
:WalletConnectorContextState
. Define the component in the following format:
OrderlyAppProvider
.
web3modal
. You can use this example as a reference to implement your own wallet connection component.