feat: paginated view function#385
Conversation
|
@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! 🚀 |
|
Check formatting |
|
Fix faiking workflow |
|
Please fix clippy |
|
Run cargo clippy --target wasm32-unknown-unknown -- -D warnings And fix clippy |
|
@Cedarich Please review this |
|
working on it |
|
reviewing now |
|
@Cedarich review now |
|
@Cedarich reapprove workflow. Can't we get an automatic approval? |
|
@Cedarich I've updated again. Awaiting the next approval so i can start working on the next issue |
|
Update made, awaiting approval, on to the next fix |
|
@Cedarich Awaiting approval |
|
Alright. Awaiting next approval @Cedarich |
|
Next approval |
|
Next approval @Cedarich |
|
Awaiting approval @Cedarich |
|
@Cedarich awaiting approval (hopefully the last) |
|
@Cedarich Awaiting approval |
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
|
@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
|
@Cedarich awaiting next approval |
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