Skip to content

Commit

Permalink
Merge pull request #455 from yieldprotocol/feat/disclaimer
Browse files Browse the repository at this point in the history
Add in the disclaimer on wallet connect
  • Loading branch information
brucedonovan authored Sep 20, 2023
2 parents 07bec22 + 62e027b commit 7f64176
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/contexts/ConnectionWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useQueryClient } from 'react-query';
import { AppProps } from 'next/app';
import {
AvatarComponent,
DisclaimerComponent,
RainbowKitProvider,
darkTheme,
getDefaultWallets,
Expand Down Expand Up @@ -110,6 +111,15 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => {
);
};

const Disclaimer: DisclaimerComponent = ({ Text, Link }) => (
<Text>
By connecting my wallet, I agree to the{' '}
<Link href="https://cacti.finance/terms/">Terms of Service</Link> and acknowledge I have
read and understand the protocol{' '}
<Link href="https://cacti.finance/privacy/">Privacy Policy</Link>.
</Text>
);

return (
<WagmiConfig client={wagmiClient}>
{useSiwe && (
Expand All @@ -120,6 +130,10 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => {
getSignoutCallback={getSignoutCallback}
>
<RainbowKitProvider
appInfo={{
appName: 'Cacti',
disclaimer: Disclaimer,
}}
chains={chains}
theme={
experimentalUi
Expand All @@ -128,6 +142,7 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => {
}
showRecentTransactions={true}
avatar={CustomAvatar}
modalSize="compact"
>
{children}
</RainbowKitProvider>
Expand All @@ -136,6 +151,10 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => {

{!useSiwe && (
<RainbowKitProvider
appInfo={{
appName: 'Cacti',
disclaimer: Disclaimer,
}}
chains={chains}
theme={
experimentalUi
Expand All @@ -144,6 +163,7 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => {
}
showRecentTransactions={true}
avatar={CustomAvatar}
modalSize="compact"
>
{children}
</RainbowKitProvider>
Expand Down

0 comments on commit 7f64176

Please sign in to comment.