coinbase / onchainkit

React components and TypeScript utilities to help you build top-tier onchain apps.
https://onchainkit.xyz
MIT License
540 stars 128 forks source link

Bug: Error fetching token balance #1228

Open Infinnerty opened 3 weeks ago

Infinnerty commented 3 weeks ago

Describe the bug and the steps to reproduce it

  1. Integrate OnchainKit into React/NextJS codebase.
  2. Define .env
  3. Start app (yarn dev)
  4. Login/Connect wallet
  5. Render swap component
  6. Error fetching token balance

What's the expected behavior?

As per the onchainkit example, I would expect swap component to allow me to enter amounts and not error.

image

What version of the libraries are you using?

Infinnerty commented 3 weeks ago

Note, I tried inspecting error in console logs but do not see anything of interest. Might be missing something though!

Zizzamia commented 3 weeks ago

Thank you for reaching out to us. Here a couple of follow up questions:

Also can you please still copy the error messages in your console.log

fakepixels commented 2 weeks ago

@Infinnerty Want to check back in and follow up whether the problem has been addressed.

Infinnerty commented 1 week ago

@fakepixels -- sorry for delay, was at Token2049.

what wallet did you use? like EOA, Smart Wallet?

does your wallet have ETH in it?

have you followed all Getting Started steps https://onchainkit.xyz/getting-started, including Step 2 and Step 3 in setting up the Public API Key?

function OnchainProviders({ children }: Props) {
  const wagmiConfig = useWamigConfig();

  return (
    <WagmiProvider config={wagmiConfig}>
      <QueryClientProvider client={queryClient}>
        <OnchainKitProvider apiKey={NEXT_PUBLIC_CDP_API_KEY} chain={base}>
          <RainbowKitProvider modalSize="compact">
            {children}
          </RainbowKitProvider>
        </OnchainKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
}

I can't see what logs to share in the console; have upgraded to 0.33.1 and still seeing the same error