Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/WalletToolkit/WalletDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ const useStyles = makeStyles<any>()((theme, { dark }) => ({
}));

const WalletDropdown = (props) => {
if (!process.env.NEXT_PUBLIC_PRIVY_APP_ID) {
Comment thread
Turupawn marked this conversation as resolved.
Outdated
return (
<div>
<span>Privy is not configured</span>
</div>
);
}
const { dark } = props;
const { classes } = useStyles({ dark });
const pathname = usePathname();
Expand Down
30 changes: 17 additions & 13 deletions src/contexts/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,22 @@ const privyConfig: PrivyClientConfig = {

export default function Providers({ children }: { children: React.ReactNode }) {
return (
<PrivyProvider
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
apiUrl={process.env.NEXT_PUBLIC_PRIVY_AUTH_URL as string}
appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID as string}
config={privyConfig}
>
<QueryClientProvider client={queryClient}>
<WagmiProvider config={wagmiConfig} reconnectOnMount={false}>
<MessageProvider>{children}</MessageProvider>
</WagmiProvider>
</QueryClientProvider>
</PrivyProvider>
<QueryClientProvider client={queryClient}>
{process.env.NEXT_PUBLIC_PRIVY_APP_ID ? (
<PrivyProvider
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
apiUrl={process.env.NEXT_PUBLIC_PRIVY_AUTH_URL as string}
appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID as string}
config={privyConfig}
>
<WagmiProvider config={wagmiConfig} reconnectOnMount={false}>
<MessageProvider>{children}</MessageProvider>
</WagmiProvider>
</PrivyProvider>
) : (
<MessageProvider>{children}</MessageProvider>
)}
</QueryClientProvider>
);
}