Skip to content

Conversation

@dvush
Copy link
Contributor

@dvush dvush commented Oct 24, 2025

πŸ“ Summary

Refund in bundles was restored incorrectly because payer and receiver tx hashes were swapped.

πŸ’‘ Motivation and Context


βœ… I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@Copilot Copilot AI review requested due to automatic review settings October 24, 2025 12:37
@dvush dvush requested a review from ZanCorDX as a code owner October 24, 2025 12:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the bundle refund restoration logic where the payer and receiver transaction hashes were incorrectly swapped, causing refunds to be applied to the wrong transaction.

Key Changes

  • Renamed receiver_hash to refund_payer_hash to clarify that this represents the payer transaction
  • Inverted the refund logic so that refund_percent is applied to the payer transaction (matching the hash) instead of other transactions
  • Updated test data to use a different transaction hash (0x02 instead of 0x01) to properly validate the fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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