Consolidated PayFlow Testing and Validation Enhancements#5
Open
software321dev wants to merge 7 commits into
Open
Consolidated PayFlow Testing and Validation Enhancements#5software321dev wants to merge 7 commits into
software321dev wants to merge 7 commits into
Conversation
added 7 commits
June 1, 2026 22:09
Add test_charge_insufficient_allowance that: - Subscribes a user with sufficient allowance - Revokes allowance (sets to 0) - Advances ledger past interval - Calls charge() which panics due to transfer_from failure Closes SiLioLabs#232
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.
This PR consolidates the implementation for four critical testing and validation issues for the PayFlow platform:
subscribe()are indeed contracts by checking their XDR serialization discriminator (Closes Addsubscribe()token-address validation SiLioLabs/PayFlow#243).Vec<ChargeResult>frombatch_chargeexactly matches the order of theusersargument, even with skipped or missing subscriptions (Closes Addbatch_chargeresult ordering test SiLioLabs/PayFlow#244).batch_chargefor up to 100 users, verifying it handles scale without hitting panic or gas limits (Closes Addbatch_chargelarge-list stress test SiLioLabs/PayFlow#235).test_charge_insufficient_allowancetest, confirming thatcharge()correctly fails when a token allowance drops below the subscription amount (Closes Addcharge()insufficient-allowance error path test SiLioLabs/PayFlow#232).