fix: resolve 404 balances endpoint and currency formatting errors

- Add missing /api/v1/balances endpoint to backend
- Update frontend Account type to match backend AccountDetails model
- Add currency validation with EUR fallback in formatCurrency function
- Update AccountsOverview, TransactionsList, and Dashboard components
- Fix balance calculations to use balances array structure
- All pre-commit checks pass
This commit is contained in:
Elisiário Couto
2025-09-08 23:45:31 +01:00
committed by Elisiário Couto
parent 947342e196
commit 417b77539f
6 changed files with 149 additions and 69 deletions

View File

@@ -1,13 +1,20 @@
export interface AccountBalance {
amount: number;
currency: string;
balance_type: string;
last_change_date?: string;
}
export interface Account {
id: string;
name: string;
bank_name: string;
account_type: string;
currency: string;
balance?: number;
institution_id: string;
status: string;
iban?: string;
created_at: string;
updated_at: string;
name?: string;
currency?: string;
created: string;
last_accessed?: string;
balances: AccountBalance[];
}
export interface Transaction {