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] Wallet balance not working #1750

Closed
1 task done
Markcode1992 opened this issue Feb 5, 2024 · 5 comments · Fixed by #1760
Closed
1 task done

[bug] Wallet balance not working #1750

Markcode1992 opened this issue Feb 5, 2024 · 5 comments · Fixed by #1760

Comments

@Markcode1992
Copy link

Markcode1992 commented Feb 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

1.3.4

wagmi Version

1.4.13

Current Behavior

account.displayBalance is not working anymore and doesn't show anything

Expected Behavior

account.displayBalance is supposed to show wallet balance

Steps To Reproduce

Connect wallet and check for balance

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

Works fine to 1.3.2

@magiziz
Copy link
Contributor

magiziz commented Feb 5, 2024

@Markcode1992 Are you able to link us a small reproducible example ?

There are some cases where you might not see your balance such as:

  1. If you have set showBalance to false on one of the responsive values for largeScreen and smallScreen.
  2. The rpc provider you use in wagmi configuration hasn't made a successful call to fetch your balance.
  3. Your wallet isn't connected or isn't giving you back address from wagmi's useAccount hook.

@Markcode1992
Copy link
Author

Hello, so I've checked everything and all is correct. With the normal button it shows but this issue is only with <ConnectButton.Custom>

The balance does not show. What I noticed is if I add the <ConnectButton.Custom> with then the balance shows in both. So the issue is most definitely with the custom wallet configuration.

@Markcode1992
Copy link
Author

Markcode1992 commented Feb 6, 2024

Just reproduced the same issue in another project. Upgraded from 1.3.0 to 1.3.4 and the balance stopped showing in the custom connect wallet button.

@magiziz
Copy link
Contributor

magiziz commented Feb 8, 2024

@Markcode1992 Are you able to give us a small reproducible example ? Also if you could show me the code you've written that'd be super helpful!

@Markcode1992
Copy link
Author

Markcode1992 commented Feb 8, 2024

Here you go:
https://codesandbox.io/p/live/cddf9fbe-7a3e-4faa-969f-6e97b8837300

Try this, you see that the custom button doesn't show balance. But enable the commented out regular connect button and both show balance.

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

Successfully merging a pull request may close this issue.

2 participants