Skip to content

feat: project pro-rata returns in invoice invest panel - #564

Open
Davidemulo wants to merge 1 commit into
StellarState:devfrom
Davidemulo:david-558-pro-rata-projection
Open

Davidemulo wants to merge 1 commit into
StellarState:devfrom
Davidemulo:david-558-pro-rata-projection

Conversation

@Davidemulo

Copy link
Copy Markdown

Summary

  • Add a pro-rata projection inside the invoice investment panel, with fraction count synchronized to the investment amount and a maturity/custom hold-date selector.
  • Use the issuer's dynamic yield history when available, the live investment fee schedule, and the XLM/USD rate to show gross return, fee, net return, and net ROI. Fall back to the invoice yield when issuer history is unavailable and avoid inventing unavailable fee or USD values.
  • Cover the calculation and live UI updates, including a custom date, non-whole-fraction remainder, and over-cap input.

Closes #558

Verification

  • npm run type-check passed.
  • Focused Vitest suite: 28 tests passed across 5 files.
  • npm run build passed; it reported existing dependency and hook warnings outside this change.

Note

The issuer dynamic-yield API function is identical to the one introduced in the open #552 PR. Once either PR merges, Git will deduplicate that shared addition when the other is updated.

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

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

@TS-mfon

TS-mfon commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

✅ PR Ready for Review

Due to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging.

This PR has passed all automated checks:

  • ✅ Security scan — no malicious code detected
  • ✅ No merge conflicts

A maintainer will review and merge this PR shortly.

@TS-mfon

TS-mfon commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

⚠️ Merge Conflict Detected

This PR currently has a merge conflict and cannot be merged until it is resolved.

Please rebase or merge the latest changes from the base branch into your branch and push again.

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 pro-rata return projection calculator on invoice detail invest panel

3 participants