Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

Users with zero BACON balance see "Value must be less than or equal to 0" when entering stake amounts because max="{{ user_bacon_balance }}" renders as max="0".

Changes

  • Template: Conditionally render max attribute only when user_bacon_balance > 0 in stake amount input
  • Server-side validation unchanged, still enforces balance requirements
- max="{{ user_bacon_balance }}"
+ {% if user_bacon_balance > 0 %}max="{{ user_bacon_balance }}"{% endif %}

Users without BACON now submit the form and receive the existing server-side error message instead of cryptic HTML5 validation.

Original prompt

This section details on the original issue you should resolve

<issue_title>Value error when starting a staking pool</issue_title>
<issue_description>image</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

When user has 0 BACON balance, only set max attribute if balance > 0
This prevents HTML5 validation error "Value must be less than or equal to 0"

Co-authored-by: DonnieBLT <[email protected]>
Copilot AI changed the title [WIP] Fix value error when starting a staking pool Fix HTML5 validation error for stake amount when user has zero BACON Oct 26, 2025
Copilot AI requested a review from DonnieBLT October 26, 2025 05:26
@DonnieBLT DonnieBLT marked this pull request as ready for review October 26, 2025 05:34
@DonnieBLT DonnieBLT merged commit def8293 into main Oct 26, 2025
22 of 32 checks passed
@DonnieBLT DonnieBLT deleted the copilot/fix-value-error-staking-pool branch October 26, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Value error when starting a staking pool

2 participants