This repository was archived by the owner on Sep 8, 2025. It is now read-only.
fix: disable staking when user has no baby - #1286
Merged
Merged
Conversation
jonybur
requested review from
0xDazzer,
gbarkhatov,
jeremy-babylonlabs and
jrwbabylonlab
as code owners
July 24, 2025 00:20
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR disables staking functionality when users have no BABY token balance by adding validation to prevent staking attempts without the required token.
- Adds BABY balance validation to staking form validation
- Updates error handling to display "Insufficient BABY Balance" message
- Removes placeholder validation logic that was always returning true
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ui/legacy/state/MultistakingState.tsx | Adds BABY balance validation and error handling to legacy staking component |
| src/ui/common/state/MultistakingState.tsx | Adds BABY balance validation and error handling to common staking component |
Comments suppressed due to low confidence (2)
src/ui/legacy/state/MultistakingState.tsx:124
- Variable name 'bbnBalance' is inconsistent with the error message which refers to 'BABY Balance'. Consider renaming to 'babyBalance' for clarity and consistency.
() => bbnBalance > 0,
src/ui/common/state/MultistakingState.tsx:141
- Variable name 'bbnBalance' is inconsistent with the error message which refers to 'BABY Balance'. Consider renaming to 'babyBalance' for clarity and consistency.
() => bbnBalance > 0,
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jrwbabylonlab
approved these changes
Jul 24, 2025
jrwbabylonlab
left a comment
Contributor
There was a problem hiding this comment.
Will follow up the insufficient btc funds to cover fess in other PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.