Skip to content

EasyInvoice - Display USD Values for All Invoices Using API Conversion Data #165

@MantisClone

Description

@MantisClone

EasyInvoice - Display USD Values for All Invoices Using API Conversion Data

Problem

Easy Invoice currently only displays USD totals for invoices denominated in USD/stablecoins, with an asterisk noting "Invoices not denominated in USD aren't used for this calculation" (#143). This means:

  • Users cannot see the USD value of unpaid crypto-denominated invoices
  • Dashboard totals are incomplete and don't reflect the true value of their invoice portfolio
  • No conversion data exists yet for unpaid invoices, subscriptions, and recurring payments

Proposed Solution

Fetch real-time conversion data from the Request Network API for all non-USD invoices to display accurate USD values.

Implementation:

  • Use the Request API's GET /request/{requestId} endpoint which includes conversion information
  • Implement pagination for invoice tables to manage API request volume
  • Cache conversion rates on the frontend to minimize redundant API calls
  • Only fetch conversion data for non-USD denominated requests

Note: This can be implemented using individual GET /request/{requestId} calls for each invoice since Easy Invoice stores requests in its database and can paginate locally. However, performance would significantly improve with a batch endpoint (see related API issue below).

Considerations

API Dependencies:

Performance & Rate Limiting:

  • Need smart caching and request throttling to avoid rate limits
  • Implement pagination before rollout to prevent overwhelming the API
  • Include proper error handling and loading states

Related: Follow-up to #143

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    🎫 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions