Skip to content

fix(refunder): Align refund submission UIDs with loaded order data#4412

Open
metalurgical wants to merge 2 commits into
cowprotocol:mainfrom
metalurgical:refunder_uid_order_pair_fix
Open

fix(refunder): Align refund submission UIDs with loaded order data#4412
metalurgical wants to merge 2 commits into
cowprotocol:mainfrom
metalurgical:refunder_uid_order_pair_fix

Conversation

@metalurgical
Copy link
Copy Markdown
Contributor

@metalurgical metalurgical commented May 14, 2026

Description

Keep submitted UIDs aligned with successfully loaded ETHFlow order data.

This avoids mismatched internal submission inputs when DB lookups fail, skips empty submissions, and improves failed lookup logging.

Changes

  • Pair each UID with its loaded ETHFlow order data before filtering failed DB lookups.
  • Submit only successfully loaded pairs.
  • Skip refund submission when no order data could be loaded.
  • Include the failed UID in DB lookup error logs.
  • Update refunder tests.
  • Update docs and comments.

How to test

cargo nextest -p refunder

Keep refund submission UIDs paired with successfully loaded ETHFlow
order data.

Additionally, skip empty submissions and improve DB error logging.
@metalurgical metalurgical requested a review from a team as a code owner May 14, 2026 15:54
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the refund processing logic in RefundService to ensure that only UIDs with successfully retrieved order data are included in transaction batches. This fixes a previous issue where UIDs and order data could become misaligned. The implementation now uses unzip to maintain alignment and skips submission if no valid orders are found. Tests have been updated to verify these changes. I have no feedback to provide as the existing review comment does not meet the high or critical severity threshold required by the repository style guide.

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.

1 participant