Skip to content

Conversation

homanp
Copy link
Collaborator

@homanp homanp commented Jul 18, 2025

This pull request integrates the Coinbase OnchainKit Fund Button into our Next.js application's home page. Here's a summary of the changes:

  1. Added @coinbase/onchainkit as a dependency in package.json.
  2. Updated app/layout.tsx to include OnchainKit styles and wrap the application with the Providers component.
  3. Modified app/page.tsx to import and render the FundButton component on the home page.

Note: This PR does not include the setup of environment variables or the creation of a providers.tsx file. These steps should be completed separately to ensure full functionality of the OnchainKit integration.

To complete the integration, please follow these additional steps:

  1. Create a .env file in the project root with the following content:

    NEXT_PUBLIC_ONCHAINKIT_API_KEY=YOUR_CLIENT_API_KEY
    NEXT_PUBLIC_CDP_PROJECT_ID=YOUR_CDP_PROJECT_ID
    

    Replace YOUR_CLIENT_API_KEY and YOUR_CDP_PROJECT_ID with your actual values.

  2. Create a providers.tsx file in the app directory with the following content:

    'use client';
    import { OnchainKitProvider } from '@coinbase/onchainkit';
    import { base } from 'wagmi/chains';
    
    export function Providers({ children }: { children: React.ReactNode }) {
      return (
        <OnchainKitProvider
          apiKey={process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY!}
          projectId={process.env.NEXT_PUBLIC_CDP_PROJECT_ID!}
          chain={base}
        >
          {children}
        </OnchainKitProvider>
      );
    }

These changes add the basic functionality of the Fund Button to the home page. Further customization of the button's appearance or behavior can be done as needed.

@homanp homanp added the claude Generated by Claude AI agent label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claude Generated by Claude AI agent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant