Skip to content

feat(invoices): add NAV fair value indicator - #561

Merged
TS-mfon merged 1 commit into
StellarState:devfrom
flashdeed05-ai:feature/546-nav-fair-value-indicator
Oct 21, 2026
Merged

TS-mfon merged 1 commit into
StellarState:devfrom
flashdeed05-ai:feature/546-nav-fair-value-indicator

Conversation

@flashdeed05-ai

Copy link
Copy Markdown

Adds the computed NAV of an invoice against its current market price, so an investor can see whether the market is paying a premium or a discount.

  • lib/nav.ts: the pricing rules as pure helpers — where the price sits relative to NAV, the gap in basis points, and when a NAV is stale.
  • lib/api: fetchInvoiceNav reads GET /invoices/:id/nav and normalises the field spellings the endpoint has shipped. A 404 is "no NAV", not an error, so an unpriced invoice hides the chip instead of failing.
  • NavChip on the marketplace card and list row, and InvoiceNavPanel in the invest panel on the invoice detail page.
  • The chip and panel render nothing when an invoice has no NAV, and warn once the NAV is more than an hour old.

Also fixes a pre-existing type error in FeeTierDisplay that was failing tsc --noEmit on dev, and with it the last merged CI run.

Close #546
Close #548
Close #550
Close #549

Description

Closes #

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring
  • ✅ Test addition or update
  • 🔧 Configuration change

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

How to Test

  1. Step one
  2. Step two
  3. Step three

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • E2E tests added/updated (if applicable)
  • Manual testing completed

Screenshots (if applicable)

Additional Notes

For Reviewers

  • Code quality and readability
  • Test coverage
  • Security implications
  • Performance impact
  • Breaking changes

Adds the computed NAV of an invoice against its current market price, so
an investor can see whether the market is paying a premium or a discount.

- lib/nav.ts: the pricing rules as pure helpers — where the price sits
  relative to NAV, the gap in basis points, and when a NAV is stale.
- lib/api: fetchInvoiceNav reads GET /invoices/:id/nav and normalises the
  field spellings the endpoint has shipped. A 404 is "no NAV", not an
  error, so an unpriced invoice hides the chip instead of failing.
- NavChip on the marketplace card and list row, and InvoiceNavPanel in the
  invest panel on the invoice detail page.
- The chip and panel render nothing when an invoice has no NAV, and warn
  once the NAV is more than an hour old.

Also fixes a pre-existing type error in FeeTierDisplay that was failing
`tsc --noEmit` on dev, and with it the last merged CI run.

Fixes StellarState#546
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@flashdeed05-ai 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 merged commit cb5231b into StellarState:dev Oct 21, 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

3 participants