Elements Provider
For elements to work, use need to use the ElementsProvider.
Elements Provider takes care of wallet connections, signing transactions, etc... inside elements.
Usage
Web3 Wallet Connect Support
If your dApp supports web3 wallet connect, you must pass in the walletConnectOptions
prop.
Capsule Support
If your dApp supports social login via capsule, you must pass in the capsuleConfig
prop.
Props
* Denotes required props
Prop | Type | Description |
---|---|---|
|
| The primary chain your dApp's user will connect to. |
|
| Method to trigger your dApps' connect wallet flow. |
|
| Which wallet is connected on the dApp. |
| Wallet Connect (WC) options. | |
| Social Login options. |
Migrating from WalletClientContextProvider
WalletClientContextProvider
We have removed the WalletClientContextProvider
for the following reasons
Makes it difficult to integrate elements
Hard to set up correctly
Needs maintenance/updates if any wallet related code changes
We want dApps' to be able to integrate Elements seamlessly, and hence we introduced a new, simpler ElementsProvider
. Elements Provider handles everything for you and requires minimal setup.
Follow these steps for the migration -
Replace
WalletClientContextProvider
withElementsProvider
Pass in the only two required props
connectWallet
- triggers the wallet connect flow of your dAppconnectedWalletType
- which wallet is currently connected to your dApp
And that's it! If you're using Web3 Wallet Connect or Capsule, please setup the respective configs accordingly.
Last updated