Skip to content
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
jrwbabylonlab merged 5 commits into
mainfrom
jb-disable-staking-no-baby
Jul 24, 2025
Merged

fix: disable staking when user has no baby#1286
jrwbabylonlab merged 5 commits into
mainfrom
jb-disable-staking-no-baby

Conversation

@jonybur

@jonybur jonybur commented Jul 24, 2025

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings July 24, 2025 00:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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,

Comment thread src/ui/legacy/state/MultistakingState.tsx Outdated
Comment thread src/ui/common/state/MultistakingState.tsx Outdated
Jonathan Bursztyn and others added 3 commits July 24, 2025 01:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/ui/common/state/MultistakingState.tsx

@jrwbabylonlab jrwbabylonlab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will follow up the insufficient btc funds to cover fess in other PR

@jrwbabylonlab
jrwbabylonlab merged commit 7781ec7 into main Jul 24, 2025
6 checks passed
@jrwbabylonlab
jrwbabylonlab deleted the jb-disable-staking-no-baby branch July 24, 2025 02:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants