Skip to content

fix: duplicate token calls in batch escrow#26

Merged
g4titanx merged 3 commits into
masterfrom
fix/batch-single-asset-token-calls
Jun 5, 2026
Merged

fix: duplicate token calls in batch escrow#26
g4titanx merged 3 commits into
masterfrom
fix/batch-single-asset-token-calls

Conversation

@g4titanx

@g4titanx g4titanx commented Jun 5, 2026

Copy link
Copy Markdown
Member

summary

this fixes duplicate ERC20 calls in EscrowBatch when the reward asset is also one of the payment assets.

previously, the batch escrow handled reward and payment movements separately. that caused cases like USDC payment rows + USDC reward to produce two token calls: one for the reward and one for the payment bucket. the single ERC20 escrow already avoids this by moving reward + payment together.

changes

  • fold reward into the matching asset bucket during _fund
  • fold reward into the matching asset bucket during cancelAndWithdraw
  • aggregate collect payouts by asset before sending funds to the bidder
  • fold bond + rewardShare into the reward asset payout bucket
  • add tests for one-call-per-token behavior

@g4titanx g4titanx marked this pull request as ready for review June 5, 2026 09:21
@g4titanx g4titanx requested a review from ozwaldorf June 5, 2026 09:21
@g4titanx g4titanx merged commit 831167a into master Jun 5, 2026
5 checks passed
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