Skip to content

feat: Add bulk position management and batch transaction building#228

Open
OTimileyin wants to merge 2 commits into
Dgetsylver:mainfrom
OTimileyin:feature/bulk-position-management
Open

feat: Add bulk position management and batch transaction building#228
OTimileyin wants to merge 2 commits into
Dgetsylver:mainfrom
OTimileyin:feature/bulk-position-management

Conversation

@OTimileyin
Copy link
Copy Markdown

Summary

This pull request implements the Bulk Position Management feature (Issue #15). It introduces multi-select checkboxes to the Overview/Dashboard position list, allowing users to batch multiple actions into a single signed transaction.

Features implemented:

  • Checkbox Table Columns: A Select-All checkbox in the table header, and row-level checkboxes. Clicking the checkbox toggles state without triggering row detail navigation.
  • Shift-Click Multi-Select: Standard browser range selection via Shift + Click.
  • Floating Bulk Actions Bar: Appears dynamically at the bottom of the dashboard when 1 or more positions are selected. Shows selected count, Close Selected button, and Adjust Leverage inputs.
  • Confirmation Modal: Displays affected positions, leverage changes, and estimated health factors with color-coded safety indicators before signing.
  • Smart Transaction Batching: Multi-asset actions targeting the same Blend pool are bundled into a single contract call (submit_with_allowance). Multiple pools are added as separate operations in a single Stellar transaction (requiring only one wallet signature).
  • Safety Limits: Dynamically checks and intercepts leverage target adjustments that exceed the asset's safe limits.

Related Issue

Closes #15

Checks

  • I read the contribution guide.
  • I kept this pull request scoped to the linked issue.
  • I ran the relevant local checks or explained why they were skipped.
  • For Drips wave issues, I claimed the issue before opening this pull request.

Notes for Reviewers

  • Transaction Building & Security: Safe limits are validated at calculation time. We've written a custom Vitest unit test suite located at frontend/test/bulk_tx.test.ts to mock the Stellar SDK and verify XDR construction for both Close and Adjust paths.
  • Demo Mode Testing: For local testing convenience without active testnet/mainnet wallets, clicking "View Demo" on the landing page now populates the Dashboard with multiple mock positions so the multi-select range selection and confirmation modals can be interacted with directly.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@OTimileyin 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

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.

A13: Bulk position management

2 participants