Skip to content

fix(stakes): remove 1 ICP minimum for neuron top-up#347

Merged
yhabib merged 2 commits intomainfrom
fix/top-up-minimum
Mar 25, 2026
Merged

fix(stakes): remove 1 ICP minimum for neuron top-up#347
yhabib merged 2 commits intomainfrom
fix/top-up-minimum

Conversation

@yhabib
Copy link
Collaborator

@yhabib yhabib commented Mar 25, 2026

Motivation

The top-up neuron flow previously enforced a minimum of 1 ICP on the frontend, but there is no such limit at the protocol level. Any positive amount should be valid for topping up an existing neuron.

Changes

  • Removed the 1 ICP minimum validation from the top-up flow; it now only requires an amount greater than zero.
  • Updated the error message to align with the Send ICP flow: "Enter an amount greater than zero."
  • Revised end-to-end tests to validate both zero amount and insufficient balance errors instead of the previous minimum check.

@yhabib yhabib requested a review from a team as a code owner March 25, 2026 12:34
Copilot AI review requested due to automatic review settings March 25, 2026 12:34
@github-actions
Copy link

github-actions bot commented Mar 25, 2026

📊 Build Bundle Stats

The latest build generated the following assets:

dist/index.html                                           1.92 kB │ gzip:   0.69 kB
dist/assets/index-Clheerh4.css                          129.10 kB │ gzip:  20.41 kB
dist/assets/neuron-VGIfgnqp.js                            0.08 kB │ gzip:   0.09 kB
dist/assets/externalServices-CyoGFp16.js                  0.24 kB │ gzip:   0.18 kB
dist/assets/Spinner-Da_8zV1x.js                           0.58 kB │ gzip:   0.40 kB
dist/assets/service-yG08aE9K.js                           0.60 kB │ gzip:   0.39 kB
dist/assets/numbers-55QxDXou.js                           0.61 kB │ gzip:   0.37 kB
dist/assets/useTvlValue-DDGY1qv3.js                       0.64 kB │ gzip:   0.44 kB
dist/assets/PageHeader-Cr3cEbbs.js                        0.75 kB │ gzip:   0.44 kB
dist/assets/Separator-DHf0zdbH.js                         0.77 kB │ gzip:   0.46 kB
dist/assets/CertifiedBadge-DmRweJt3.js                    0.80 kB │ gzip:   0.48 kB
dist/assets/useIcpIndex-BYCr-FoI.js                       1.08 kB │ gzip:   0.63 kB
dist/assets/Switch-CJCknlk_.js                            1.65 kB │ gzip:   0.83 kB
dist/assets/useIcpSwapPrices-D7pCcQM9.js                  1.72 kB │ gzip:   0.94 kB
dist/assets/CopyButton-BmQnBPdv.js                        1.86 kB │ gzip:   0.95 kB
dist/assets/AnimatedNumber-B8VCo9k0.js                    1.86 kB │ gzip:   1.04 kB
dist/assets/useInfiniteQueryThenUpdateCall-86QWI44B.js    1.93 kB │ gzip:   0.96 kB
dist/assets/addressBook-CM-m9G5o.js                       2.63 kB │ gzip:   1.33 kB
dist/assets/ToggleGroup-BgbhffhC.js                       3.05 kB │ gzip:   1.33 kB
dist/assets/Input-Cl2FiTPa.js                             3.71 kB │ gzip:   1.43 kB
dist/assets/_auth-CZ7ZpC1l.js                             3.76 kB │ gzip:   1.90 kB
dist/assets/QueryStates-zRP8DzQl.js                       5.42 kB │ gzip:   1.76 kB
dist/assets/MarkdownRenderer-Cf4tkPtQ.js                  5.69 kB │ gzip:   2.61 kB
dist/assets/index-Dj4MDUzM.js                             8.68 kB │ gzip:   3.36 kB
dist/assets/AmountInput-BHAe7T0Z.js                       8.90 kB │ gzip:   3.79 kB
dist/assets/TopicFollowingAccordion-Yehthy_u.js           9.25 kB │ gzip:   3.78 kB
dist/assets/types-COdqJ1Vg.js                            10.70 kB │ gzip:   4.57 kB
dist/assets/index-C5F_DFJv.js                            12.60 kB │ gzip:   3.92 kB
dist/assets/index-BjJJ-A2P.js                            29.34 kB │ gzip:   9.52 kB
dist/assets/DepositICPModal-BcRdvTI6.js                  44.81 kB │ gzip:  15.79 kB
dist/assets/index-CfiIpc2j.js                            47.77 kB │ gzip:  14.26 kB
dist/assets/index-DglFpJKA.js                            50.60 kB │ gzip:  14.96 kB
dist/assets/index-Dkoagb0Y.js                            79.75 kB │ gzip:  23.71 kB
dist/assets/vendor-md-Ick_ICXl.js                        89.32 kB │ gzip:  25.51 kB
dist/assets/index-Czmcuo_U.js                           118.90 kB │ gzip:  38.27 kB
dist/assets/vendor-tanstack-CT_0PJme.js                 126.65 kB │ gzip:  39.34 kB
dist/assets/index-C-xUWrST.js                           127.24 kB │ gzip:  36.97 kB
dist/assets/vendor-core-react-By6K7kM9.js               193.24 kB │ gzip:  60.69 kB
dist/assets/vendor-recharts-CFHBZI5A.js                 228.10 kB │ gzip:  65.92 kB
dist/assets/vendor-icp-CEMV6PMV.js                      402.37 kB │ gzip: 100.05 kB
dist/assets/vendor-libs-BHnWrbZ3.js                     540.02 kB │ gzip: 178.56 kB

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 updates the neuron top-up (increase stake) flow to remove the frontend’s 1 ICP minimum and instead only require a positive amount, aligning the validation/error message with the Send ICP flow.

Changes:

  • Removed the 1 ICP minimum validation from the neuron top-up view and replaced it with a “greater than zero” check.
  • Updated the English i18n error message for low amount to “Enter an amount greater than zero.”
  • Adjusted the e2e test case for the top-up validation flow.

Reviewed changes

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

File Description
src/governance-app-frontend/src/features/stakes/components/neuronDetail/NeuronDetailIncreaseStakeView.tsx Replaces min-amount validation with <= 0 validation for top-ups.
src/governance-app-frontend/src/i18n/en/modals/neuronDetail.json Updates the low-amount error message text for neuron top-up.
src/governance-app-frontend/tests/e2e/neuron-detail-modal.spec.ts Updates e2e validation scenario inputs for the top-up flow.

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

@cgundy cgundy closed this Mar 25, 2026
@cgundy cgundy reopened this Mar 25, 2026
@yhabib yhabib enabled auto-merge March 25, 2026 13:45
@yhabib yhabib added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit 7d08b6e Mar 25, 2026
17 checks passed
@yhabib yhabib deleted the fix/top-up-minimum branch March 25, 2026 13:59
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.

4 participants