Repository navigation
fix(milestones): add validated amount input to MilestoneFundButton and PoolDepositButton (#83, #69) - #111
Open
ghzhost wants to merge 1 commit into
Open
fix(milestones): add validated amount input to MilestoneFundButton and PoolDepositButton (#83, #69)#111ghzhost wants to merge 1 commit into
ghzhost wants to merge 1 commit into
Conversation
…d PoolDepositButton (MergeFi#83, MergeFi#69)
|
Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #83
Closes #69
Changes:
Extracted Monetary Input Validation Helper (
src/lib/money.ts):parseMoneyInput(raw: string, asset: "USDC" | "XLM")enforcing positive non-zero numeric validation, rejecting exponent syntax, negative numbers, non-numeric strings, and enforcing decimal precision rules (2places for USDC,7places for XLM).src/lib/money.test.tscovering zero, negative, empty, non-numeric, overflow, and decimal limits.MilestoneFundButton Amount Input (MilestoneFundButton has no amount input, making partial milestone funding impossible from the UI #83):
MilestoneFundButtonmatching the pattern used across funding actions.m.budget - m.distributed) or 100.POST /milestones/:id/fund.PoolDepositButton Input Validation (Validate PoolDepositButton's amount input before posting to the maintenance-pool deposit endpoint #69):
PoolDepositButtonwith live inline validation feedback.MilestonesPageto enforce asset-specific decimal precision (USDC / XLM).Verification
npx jest src/lib/money.test.ts src/lib/utils.test.ts src/lib/markdown.test.tspassed (54/54 tests green).