Skip to content

[Human App Frontend] Fix Staking requirement error and Add link to the staking doc#3759

Merged
flopez7 merged 3 commits intodevelopfrom
kb/3751-fix-staking-requirements
Jan 26, 2026
Merged

[Human App Frontend] Fix Staking requirement error and Add link to the staking doc#3759
flopez7 merged 3 commits intodevelopfrom
kb/3751-fix-staking-requirements

Conversation

@KirillKirill
Copy link
Contributor

Issue tracking

Closes #3751 and #3747

Context behind the change

Fixed the logic conflict on profile page, where users get blocked due to onchain or exchange api key error even though they have staked enough.
Also added a link to the staking docs

How has this been tested?

locally mocking server response

Release plan

regular

Potential risks; What to monitor; Rollback plan

not found

@KirillKirill KirillKirill requested a review from flopez7 January 26, 2026 09:56
@KirillKirill KirillKirill self-assigned this Jan 26, 2026
@vercel
Copy link

vercel bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
human-app Ready Ready Preview, Comment Jan 26, 2026 1:09pm
4 Skipped Deployments
Project Deployment Review Updated (UTC)
faucet-frontend Ignored Ignored Preview Jan 26, 2026 1:09pm
faucet-server Ignored Ignored Preview Jan 26, 2026 1:09pm
human-dashboard-frontend Skipped Skipped Jan 26, 2026 1:09pm
staking-dashboard Skipped Skipped Jan 26, 2026 1:09pm

Request Review

@KirillKirill KirillKirill requested a review from Copilot January 26, 2026 09:58
Copy link

Copilot AI left a 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 fixes a logic conflict on the worker profile page where users were incorrectly blocked from proceeding when staking requirements were met but API key errors occurred. It also adds a link to staking documentation for creating API keys.

Changes:

  • Separated staking validation logic from API key error handling to prevent false blocking
  • Added notification system to display API key errors without blocking users
  • Added documentation link for API key creation instructions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/apps/human-app/frontend/src/shared/i18n/en.json Added translation key for API key documentation link
packages/apps/human-app/frontend/src/modules/worker/profile/components/staking-info.tsx Fixed staking validation logic, added error notifications, and included documentation link

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +60 to +69
useEffect(() => {
const stakingSummaryError =
stakingSummary?.on_chain_error || stakingSummary?.exchange_error;
if (stakingSummaryError && !isLoading && !isRefetching) {
showNotification({
type: TopNotificationType.WARNING,
message: stakingSummaryError,
});
}
}, [
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notification will be shown every time the component re-renders if the error persists, potentially spamming the user. Consider adding stakingSummaryError or a ref to track whether the notification has already been shown for the current error.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-copilot are you sure on the above? There is a if inside of effect callback that ensures notification shown only once, because isLoading, isRefetching and stakingSummary are updated at once

@vercel vercel bot temporarily deployed to Preview – staking-dashboard January 26, 2026 10:58 Inactive
@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend January 26, 2026 10:58 Inactive
@KirillKirill KirillKirill requested a review from Copilot January 26, 2026 10:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend January 26, 2026 13:08 Inactive
@vercel vercel bot temporarily deployed to Preview – staking-dashboard January 26, 2026 13:08 Inactive
@flopez7 flopez7 merged commit ebfdeca into develop Jan 26, 2026
13 checks passed
@flopez7 flopez7 deleted the kb/3751-fix-staking-requirements branch January 26, 2026 13:14
@flopez7 flopez7 mentioned this pull request Jan 26, 2026
30 tasks
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 this pull request may close these issues.

[HUMAN App][Frontend] Staking requirement error.

4 participants