fix: Add support for multi-token batch routing in a single transaction - #574
Open
Chummy-debug wants to merge 1 commit into
Open
fix: Add support for multi-token batch routing in a single transaction#574Chummy-debug wants to merge 1 commit into
Chummy-debug wants to merge 1 commit into
Conversation
|
@issue-solver-bot is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Chummy-debug 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! 🚀 |
Chummy-debug
marked this pull request as ready for review
August 26, 2026 00:34
Owner
|
KINDLY RESOLVE CONFLICTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implemented support for multi-token batch routing in a single transaction for issue #513.
The
Paymentstruct already explicitly included atoken_addressfield per payment, androute_paymentsalready iterated each payment and dispatched toprocess_single_paymentusing each payment's own token address — so the core routing logic already handled mixed tokens correctly.The missing piece was test coverage. I added
test_route_payments_multi_token_batchinpayment_router/src/lib.rswhich:route_paymentscallAll three acceptance criteria are satisfied: (1)
Paymentsupports individual token addresses, (2) batch routing handles mixed tokens, (3) tests verify multi-token routing succeeds.Changed files
payment_router/src/lib.rsTest plan
Run the contract test suite:
cargo test -p payment_router(orcargo testin the payment_router directory)This will run the new
test_route_payments_multi_token_batchtest along with all existing tests. The test verifies multi-token batch routing succeeds with correct per-token fee deductions, recipient credits, and aggregated sender volume.This PR was created as a draft by the issue solver bot. It will remain a
draft until repository CI passes.
Closes #513