Skip to content

Conversation

@ametke
Copy link
Collaborator

@ametke ametke commented Jan 19, 2026

TL;DR

Added a new FailedController to handle withdrawals in the failed state and updated the domain API version.

What changed?

  • Updated the domain API version from 0.1.1 to 0.3.0 in the Gradle dependencies
  • Created a new FailedController class to handle withdrawals that are in the failed state
  • Added the FailedController to the DomainControllerModule and mapped it to the Failed state
  • Implemented the controller to reject any processing attempts on failed withdrawals with an InvalidProcessState error
  • Added tests to verify that operations on failed withdrawals return the appropriate error

How to test?

  1. Run the FailedControllerTest to verify that operations on failed withdrawals return an InvalidProcessState error
  2. Verify that a withdrawal in the Failed state with a failure reason maintains its state and reason when an operation is attempted

Why make this change?

This change improves error handling by properly managing withdrawals that have reached a failed state. By adding a dedicated controller for the Failed state, we ensure that no further processing can occur on withdrawals that have already failed, maintaining data integrity and providing clear error messages to clients.

@ametke ametke changed the title Return InvalidProcessState when an operation is attempted on a failed withdrawal [SQBTC-1444] Return InvalidProcessState when an operation is attempted on a failed withdrawal Jan 19, 2026
Copy link
Collaborator Author

ametke commented Jan 19, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ametke ametke marked this pull request as ready for review January 19, 2026 05:59
@ametke ametke requested a review from a team as a code owner January 19, 2026 05:59
@ametke ametke merged commit 1538b52 into main Jan 19, 2026
3 checks passed
@ametke ametke deleted the 01-19-return_invalidprocessstate_when_an_operation_is_attempted_on_a_failed_withdrawal branch January 19, 2026 06:02
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.

3 participants