Enhance client dashboard summary: Add pending fiat deposits to the summary metrics and update the model and frontend to display pending deposits, improving visibility of cash awaiting confirmation for DCA processing.
This commit is contained in:
parent
9ea8c37940
commit
e05404fcab
3 changed files with 19 additions and 1 deletions
1
crud.py
1
crud.py
|
|
@ -99,6 +99,7 @@ async def get_client_dashboard_summary(user_id: str) -> Optional[ClientDashboard
|
|||
user_id=user_id,
|
||||
total_sats_accumulated=total_sats,
|
||||
total_fiat_invested=total_invested, # Sum of confirmed deposits
|
||||
pending_fiat_deposits=pending_deposits, # Sum of pending deposits
|
||||
average_cost_basis=avg_cost_basis,
|
||||
current_fiat_balance=remaining_balance, # Confirmed deposits - DCA spent
|
||||
total_transactions=tx_stats["tx_count"] if tx_stats else 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue