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

feat: "Start Agent" button fix #235

Merged
merged 4 commits into from
Jul 19, 2024
Merged

feat: "Start Agent" button fix #235

merged 4 commits into from
Jul 19, 2024

Conversation

mohandast52
Copy link
Collaborator

@mohandast52 mohandast52 commented Jul 18, 2024

  • "Start Agent" button was repeated three times, causing the loading and other states to be deprioritized due to overlapping conditions.
  • Refactored the code to have a single "Start Agent" button at the bottom and added props in the condition.
  • It should work exactly the same as before and especially show different states when the "Start Agent" button is clicked after eviction.

@mohandast52 mohandast52 self-assigned this Jul 18, 2024
@mohandast52 mohandast52 added the bug Something isn't working label Jul 18, 2024
@mohandast52 mohandast52 marked this pull request as ready for review July 18, 2024 17:12
</Button>
);
}
const canActivateAgent = canStartAgent && (isAgentEvicted || isDeployable);
Copy link
Collaborator

Choose a reason for hiding this comment

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

getting lost with these can variables, they need more context

i.e. canStartAgent is not solely determined by the staking contract, and needs to be renamed to something more fitting, unsure what exactly but it should infer it's relation to the staking contract

canActivateAgent, i'm lost on what this represents too :/ canStartAgent already factors in isAgentEvicted

image

Copy link
Collaborator

@truemiller truemiller left a comment

Choose a reason for hiding this comment

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

looks good but need to rename appropriately so it's more obvious what state we're setting conditions against 🙏

@mohandast52 mohandast52 merged commit 72ebd15 into main Jul 19, 2024
4 checks passed
@mohandast52 mohandast52 deleted the mohan/eviction-fix branch July 19, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants