Skip to content

Fix #620: Prevent zero amount checkouts and subtractions#1053

Open
kyleclarktech wants to merge 2 commits intodevelopmentfrom
fix/620-prevent-zero-checkouts
Open

Fix #620: Prevent zero amount checkouts and subtractions#1053
kyleclarktech wants to merge 2 commits intodevelopmentfrom
fix/620-prevent-zero-checkouts

Conversation

@kyleclarktech
Copy link
Contributor

Summary

  • Adds validation in CheckoutAmountTransactionApplier to reject zero or negative amounts
  • Adds same validation to SubtractAmountTransactionApplier for consistency
  • Follows existing pattern from TransferAmountTransactionApplier

Test plan

  • Attempt checkout with amount=0 - should fail with validation error
  • Attempt checkout with negative amount - should fail
  • Normal positive amount checkouts should still work

🤖 Generated with Claude Code

Add validation to reject transactions with zero amounts:
- CheckoutAmountTransactionApplier: throws IllegalArgumentException if amount is 0
- SubtractAmountTransactionApplier: throws IllegalArgumentException if amount is 0

Follows the same pattern established in TransferAmountTransactionApplier.java.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@GregJohnStewart GregJohnStewart changed the base branch from main to development January 19, 2026 04:04
@github-actions
Copy link

Unit Test Results

  47 files  ±0    47 suites  ±0   15s ⏱️ ±0s
386 tests ±0  386 ✔️ ±0  0 💤 ±0  0 ±0 
562 runs  ±0  562 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 080a411. ± Comparison against base commit 80be6e6.

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.

2 participants