Skip to content

Add EscrowModule.getEscrowedValueForDepositor() to sum escrowed values - #357

Merged
BigBen-7 merged 3 commits into
Lead-Studios:mainfrom
usmanimamu17-create:fix/issue-230-escrowed-value-for-depositor
Jul 26, 2026
Merged

Add EscrowModule.getEscrowedValueForDepositor() to sum escrowed values#357
BigBen-7 merged 3 commits into
Lead-Studios:mainfrom
usmanimamu17-create:fix/issue-230-escrowed-value-for-depositor

Conversation

@usmanimamu17-create

Copy link
Copy Markdown
Contributor

Summary

Implemented getEscrowedValueForDepositor() - returns total escrowed value across all active escrows for a given depositor.

Changes

  • Added getEscrowedValueForDepositor(depositor) to EscrowModule - Returns sum of �mount across all active (unreleased, unrefunded) escrows - Returns n for no escrows or all settled - Validates depositor address, throws INVALID_ADDRESS on bad input - Added 5 unit tests covering invalid address, no escrows, all settled, mixed active/settled, and null batch results
  • Also fixed several pre-existing TypeScript compilation errors across the codebase

Closes #230

- Add getEscrowedValueForDepositor(depositor) to EscrowModule
- Returns total escrowed value across all active escrows for a depositor
- Filters out released and refunded escrows from the sum
- Add 5 unit tests: invalid address, no escrows, all settled, mixed, nulls
- Fix pre-existing TS errors in client.ts, errors.ts, network.ts, batch.ts, transaction.ts

Closes Lead-Studios#230
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@usmanimamu17-create 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

@BigBen-7

Copy link
Copy Markdown
Collaborator

This PR currently has merge conflicts with main and was skipped during the batch merge pass. Please rebase/resolve conflicts and it can be merged.

@BigBen-7
BigBen-7 merged commit eee4ab7 into Lead-Studios:main Jul 26, 2026
1 check failed
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.

feat: add EscrowModule.getEscrowedValueForDepositor() — total XLM locked across all depositor escrows

2 participants