Skip to content

test/batch-withdraw-to-auth#849

Merged
Jagadeeshftw merged 4 commits into
Fluxora-Org:mainfrom
Oyintarede:test/batch-withdraw-to-auth
Jul 16, 2026
Merged

test/batch-withdraw-to-auth#849
Jagadeeshftw merged 4 commits into
Fluxora-Org:mainfrom
Oyintarede:test/batch-withdraw-to-auth

Conversation

@Oyintarede

@Oyintarede Oyintarede commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Pull Request

closes #762

Description

This PR adds regression coverage for batch_withdraw_to to lock in the expected behavior for issue #762. The change focuses on the authorization boundary and destination handling for batched withdrawals, ensuring the contract remains secure and predictable in the edge cases that were previously untested.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test coverage improvement
  • Refactoring (no functional changes)

Related Issues

Closes #

Changes Made

-Added regression tests for recipient-only authorization in batch_withdraw_to.
-Added coverage for atomic revert behavior when a batch mixes recipients.
-Added tests to verify duplicate destinations aggregate transfers correctly.
-Added a regression test to ensure contract-address destinations are rejected with InvalidParams.
-Documented the behavior in the streaming documentation.

Snapshot Test Changes

Did this PR modify snapshot test files?

  • Yes - snapshot files were updated (explain below)
  • No - no snapshot changes

If yes, explain why snapshots changed:

Behavior Changes:

Affected Snapshots:

  • test_snapshots/test/test_*.json

Verification:

  • Reviewed every changed .json file
  • Verified storage changes match intended behavior
  • Verified event payloads are correct
  • Verified authorization requirements are correct
  • Updated relevant documentation

Snapshot Update Command Used:

SOROBAN_SNAPSHOT_UPDATE=1 cargo test -p fluxora_stream

Testing

Test Coverage

  • All tests pass locally: cargo test -p fluxora_stream
  • New tests added for new functionality
  • Existing tests updated for changed functionality
  • Test coverage remains above 95%

Manual Testing

  • Tested on local environment
  • Tested edge cases
  • Tested error conditions

Documentation

  • Code comments added/updated
  • Documentation updated (if behavior changed)
  • README updated (if needed)
  • Snapshot test documentation reviewed

Security Considerations

  • No new security concerns introduced
  • Authorization boundaries verified
  • Input validation added/verified
  • Error handling reviewed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

The targeted regression suite was verified locally with:

cargo test -p fluxora_stream --test batch_withdraw_to_auth -- --nocapture

Reviewer Checklist

  • Code quality and style
  • Test coverage adequate
  • Documentation complete
  • Snapshot changes justified and correct
  • Security implications reviewed
  • Breaking changes documented

@Jagadeeshftw
Jagadeeshftw merged commit df5c0c6 into Fluxora-Org:main Jul 16, 2026
@Jagadeeshftw

Copy link
Copy Markdown
Contributor

Merged, thanks for the contribution! This closes the linked issue.

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.

Add tests for batch_withdraw_to per-stream destination authorization and duplicate-destination handling

2 participants