mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 15:32:21 +00:00
feat(frontend): adapt to composite key transaction structure
- Update Transaction interface to include stable transaction_id field - Modify TransactionsList to use stable transaction_id for React keys - Update API models to handle new transactionId field from database - Fix API routes to properly map transaction_id in responses - Update test mocks to include transactionId field - Ensure backward compatibility with internal_transaction_id This adapts the frontend to work with the new composite primary key (accountId, transactionId) structure that prevents duplicate transactions.
This commit is contained in:
@@ -56,7 +56,8 @@ export interface RawTransactionData {
|
||||
}
|
||||
|
||||
export interface Transaction {
|
||||
internal_transaction_id: string | null;
|
||||
transaction_id: string; // NEW: stable bank-provided transaction ID
|
||||
internal_transaction_id: string | null; // OLD: unstable GoCardless ID
|
||||
account_id: string;
|
||||
transaction_value: number;
|
||||
transaction_currency: string;
|
||||
|
||||
Reference in New Issue
Block a user