feat: thorchain affiliate fees endpoint - #1227
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe changes introduce a new API endpoint Changes
Sequence DiagramsequenceDiagram
participant Client
participant API as API Handler
participant Handler
participant Indexer
Client->>API: GET /api/v1/affiliate/fees?start=X&end=Y
activate API
API->>API: Parse query parameters<br/>(default: start=0, end=now)
API->>Handler: GetAffiliateFees(start, end)
deactivate API
activate Handler
Handler->>Indexer: AffiliateFees (get all)
activate Indexer
Indexer-->>Handler: []*AffiliateFee
deactivate Indexer
Handler->>Handler: Filter by timestamp<br/>(start ≤ ts ≤ end)
Handler-->>API: AffiliateFees{Fees: filtered}
deactivate Handler
activate API
API-->>Client: 200 OK<br/>{ "fees": [...] }
deactivate API
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.