feat(invoice-escrow): add multi-token escrow payment support - #264
Open
Promzy204-bad wants to merge 1 commit into
Open
feat(invoice-escrow): add multi-token escrow payment support#264Promzy204-bad wants to merge 1 commit into
Promzy204-bad wants to merge 1 commit into
Conversation
- Fix duplicate discriminant 15 in errors.rs (Paused vs InvalidPayer); renumber InvalidPayer=16, InvalidDueDate=17, add TokenNotAccepted=18 - Add accepted_tokens Vec<Address> field to EscrowData in types.rs - Update create_escrow to accept accepted_tokens param; validate list is non-empty and payment_token is a member; enforce ensure_not_paused - Update fund_escrow to accept funding_token param; validate token against accepted_tokens; lock chosen token on first fund contribution - record_payment and refund always use the locked-in data.token - Fix Option<Address> IntoVal issues in invoke_contract calls (use .to_val()) - Emit accepted_tokens (as Val) in escrow_created event - Update all existing tests to pass new function signatures - Add 7 new multi-token unit tests covering: create with multi-token list, payment_token not in accepted list, empty accepted list, fund with accepted token, fund with rejected token, payment uses locked funding token, single-token backwards compat, accepted_tokens in created event All 67 tests pass.
|
@Promzy204-bad 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! 🚀 |
Contributor
|
Hi @Promzy204-bad, please rebase on dev to resolve struct definition conflicts in |
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.
All 67 tests pass.
Description
Closes #
Type of Change
Checklist
Testing
How to Test
Test Coverage
Screenshots (if applicable)
Additional Notes
For Reviewers