Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Error fetching token balance #1228

Open
Infinnerty opened this issue Sep 10, 2024 · 4 comments
Open

Bug: Error fetching token balance #1228

Infinnerty opened this issue Sep 10, 2024 · 4 comments

Comments

@Infinnerty
Copy link

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?

  • OnchainKit 0.31.4
@Infinnerty
Copy link
Author

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

@Zizzamia
Copy link
Contributor

Zizzamia commented Sep 10, 2024

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

  • 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?

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

@fakepixels
Copy link
Contributor

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

@Infinnerty
Copy link
Author

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

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

  • smart wallet

does your wallet have ETH in it?

  • no, there is no ETH in the wallet; do I need it to see balances? an error message seems to be the wrong path if so.

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?

  • yes, I have initalized OnChainKitProvider
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants