Skip to content

fix(SC-042): decrement pending_refund_amount on refund rejection, Add Loading Skeleton Screens#435

Merged
devEunicee merged 1 commit into
devEunicee:mainfrom
georgeefaith:fix/220-pending-refund-decrement
Jun 27, 2026
Merged

fix(SC-042): decrement pending_refund_amount on refund rejection, Add Loading Skeleton Screens#435
devEunicee merged 1 commit into
devEunicee:mainfrom
georgeefaith:fix/220-pending-refund-decrement

Conversation

@georgeefaith

@georgeefaith georgeefaith commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #220
Closes #242

reject_refund already decrements pending_refund_amount via saturating_sub to prevent inflation. This PR adds the missing acceptance-criteria test to verify the behaviour end-to-end.

Changes

  • test.rs: adds test_reject_refund_decrements_pending_and_allows_reinitiate
    • asserts pending_refund_amount is 500 after initiation
    • asserts pending_refund_amount returns to 0 after rejection (no underflow)
    • asserts a re-initiated refund for the same amount succeeds (i.e. the field was truly cleared)

Testing

cargo test test_reject_refund

Both test_reject_refund and test_reject_refund_decrements_pending_and_allows_reinitiate pass.

reject_refund already decrements pending_refund_amount via saturating_sub;
adds the missing acceptance-criteria test:
  - asserts pending_refund_amount returns to 0 after rejection
  - asserts a re-initiated refund for the same amount succeeds

Closes devEunicee#220
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@georgeefaith Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@georgeefaith georgeefaith changed the title fix(SC-042): decrement pending_refund_amount on refund rejection fix(SC-042): decrement pending_refund_amount on refund rejection, Add Loading Skeleton Screens Jun 26, 2026
@devEunicee devEunicee merged commit df26279 into devEunicee:main Jun 27, 2026
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.

#242 - Add Loading Skeleton Screens SC-042 · pending_refund_amount never decremented on refund rejection

2 participants