-
Notifications
You must be signed in to change notification settings - Fork 51
Restrict useKarmaRewardsDistributor to Status Network Sepolia only #968
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
Conversation
🦋 Changeset detectedLatest commit: a2280a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR restricts the useKarmaRewardsDistributor hook to only function on Status Network Sepolia and re-enables the KarmaButton component in the TopBar.
Key Changes:
- Added network validation to
useKarmaRewardsDistributorto prevent contract calls on unsupported networks - Re-enabled KarmaButton display in TopBar for both mobile and desktop layouts
- Hook now returns undefined data when not on Status Network Sepolia, showing "0" karma balance
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
apps/hub/src/app/_hooks/useKarmaRewardsDistributor.ts |
Added statusSepolia import and network check to disable queries on non-Sepolia networks |
apps/hub/src/app/_components/top-bar.tsx |
Uncommented KarmaButton components to re-enable karma balance display |
.changeset/karma-button-topbar.md |
Added changeset documenting KarmaButton integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ueryKey for balance fetching
jkbktl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
JulesFiliot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Changes:
useKarmaRewardsDistributoranduseKarmaBalancehook to only work on Status Network Sepolia.statusSepoliachain import from wagmi/chainsenabledcondition to include network checkThe hook will now be disabled on other networks (Mainnet, Linea, etc.) to prevent unnecessary contract calls and errors.