Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdded a backend endpoint and service method to calculate total currency supply by aggregating account balances. Enhanced frontend UI to display total supply, indicate whether negative balances are allowed, and show the current account context (user or group) in the top menu. Changes
Sequence DiagramsequenceDiagram
participant User
participant Client as Client (Browser)
participant Server as API Server
participant DB as Database
User->>Client: Navigate to currency detail
Client->>Server: GET /api/ledger/total-supply/:currencyId
Note over Server: Authenticate request
Server->>DB: Query distinct accounts for currency
DB-->>Server: [accountId, accountType] pairs
loop For each account
Server->>DB: Get balance for account
DB-->>Server: balance
Note over Server: Accumulate total
end
Server-->>Client: { currencyId, totalSupply }
Client->>Client: Render total supply & allowNegative badge
Client-->>User: Display currency details with supply & balance rules
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
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 |
Description of change
UI/UX improvements
Issue Number
closes #520
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.