@roninjin10/usedapp-rainbowkit-adapter
v0.0.2
Published
A light wrapper around growthbook based on zod
Downloads
1
Readme
usedapp-rainbowkit-adapter
A simple react component that connects rainbowkit to usedapp. This is used by OP Labs in the optimism gateway
Getting started
- Install @roninjin10/usedapp-rainbowkit-adapter
npm i @roninjin10/typesafe-growthbook
- Nest the adapter inside of your DappProvider
Follow rainbowkit docs to set up a rainbowkit as normal and then nest the adapter inside of your DappProvider
return (
<WagmiConfig client={wagmiClient}>
<RainbowKitProvider
chains={wagmiChains}
theme={rainbowThemes[theme]}
appInfo={{
appName: APP_NAME,
learnMoreUrl: externalRoutes.HOW_DO_I_START,
disclaimer: RainbowKitDisclaimer,
}}
modalSize="compact"
>
<DAppProvider
config={{
readOnlyChainId: Mainnet.chainId,
readOnlyUrls: readOnlyUrls as any,
autoConnect: false,
pollingInterval: 10_000,
networks: [
...DEFAULT_SUPPORTED_CHAINS,
chains.OptimismGoerli,
chains.Devnet,
chains.OptimismDevnet,
],
}}
>
<UseDappRainbowKitAdapter />
{restOfYourApp}
</DAppProvider>
</RainbowKitProvider>
</WagmiConfig>
)