Skip to content

feat: paginated view function#385

Merged
Cedarich merged 26 commits intoPulsefy:mainfrom
T-kesh:main
Apr 29, 2026
Merged

feat: paginated view function#385
Cedarich merged 26 commits intoPulsefy:mainfrom
T-kesh:main

Conversation

@T-kesh
Copy link
Copy Markdown
Contributor

@T-kesh T-kesh commented Apr 26, 2026

This PR implements a paginated view function list_recipient_packages that enables efficient retrieval of package IDs for specific recipients with cursor-based pagination support. The function iterates from a specified cursor position up to either cursor+limit or the total package counter, filtering packages by recipient address and returning matching package IDs. The implementation includes comprehensive test coverage for both scenarios with fewer packages than the limit and pagination with multiple pages, ensuring robust handling of edge cases like cursor overflow and limit boundaries while maintaining consistency with the existing codebase architecture and storage patterns.
closes #81

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@T-kesh 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! 🚀

Learn more about application limits

@Cedarich
Copy link
Copy Markdown
Contributor

Check formatting

@Cedarich
Copy link
Copy Markdown
Contributor

Fix faiking workflow

@Cedarich
Copy link
Copy Markdown
Contributor

Please fix clippy

@Cedarich
Copy link
Copy Markdown
Contributor

Run cargo clippy --target wasm32-unknown-unknown -- -D warnings And fix clippy

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich Please review this

@Cedarich
Copy link
Copy Markdown
Contributor

@T-kesh

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@T-kesh

working on it

@T-kesh T-kesh marked this pull request as draft April 27, 2026 13:21
@T-kesh T-kesh marked this pull request as ready for review April 27, 2026 13:24
@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich

reviewing now

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich review now

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich reapprove workflow. Can't we get an automatic approval?

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich I've updated again. Awaiting the next approval so i can start working on the next issue

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

Update made, awaiting approval, on to the next fix
@Cedarich

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 27, 2026

@Cedarich Awaiting approval
On to the next fix

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

Alright. Awaiting next approval @Cedarich

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

Next approval

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

Next approval @Cedarich

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

Awaiting approval @Cedarich

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

@Cedarich awaiting approval (hopefully the last)

@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 28, 2026

@Cedarich Awaiting approval

@Cedarich
Copy link
Copy Markdown
Contributor

@T-kesh

T-kesh added 3 commits April 29, 2026 06:06
Resolved merge conflicts in aid_escrow test files:
- Fixed import statement conflicts across all test files
- Consolidated duplicate imports and removed conflicts
- Maintained proper soroban_sdk import structure
- All test files now have consistent import formatting
- Reordered soroban_sdk imports in all test files
- Module imports (testutils, token) now come before type imports (Address, Env, etc.)
- Ensures cargo fmt --all -- --check passes without issues
- Updated: aggregates.rs, aid_escrow_tests.rs, batch.rs, core_flow_tests.rs, events.rs, integration.rs, view_status.rs, withdraw_surplus.rs
@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 29, 2026

@Cedarich awaiting next approval

- Added empty_metadata Map::new(&env) parameter to all create_package calls
- Fixed test_list_recipient_packages_few_packages test
- Fixed test_list_recipient_packages_pagination test
- test_action_specific_pause was already correctly using metadata parameter
- Ensures clippy compilation errors are resolved
- Applied cargo fmt formatting for long function calls
@T-kesh
Copy link
Copy Markdown
Contributor Author

T-kesh commented Apr 29, 2026

@Cedarich awaiting next approval

@Cedarich Cedarich merged commit 0a566ec into Pulsefy:main Apr 29, 2026
1 check 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.

Implement Paged Recipient Package Listing

2 participants