-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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:
- Requires https://github.com/RequestNetwork/request-api/pull/327
- Optional but recommended: New batch
GET /requestsendpoint (https://github.com/RequestNetwork/request-api/issues/331) would improve performance by reducing N network requests to 1 per page
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
Labels
No labels
Type
Projects
Status
🎫 Backlog