diff --git a/leggend/services/database_service.py b/leggend/services/database_service.py index 42c03f4..00af994 100644 --- a/leggend/services/database_service.py +++ b/leggend/services/database_service.py @@ -446,7 +446,7 @@ class DatabaseService: ( account_id, balance_data.get("institution_id", "unknown"), - "active", + balance_data.get("account_status"), balance_data.get("iban", "N/A"), float(balance_amount["amount"]), balance_amount["currency"], diff --git a/leggend/services/sync_service.py b/leggend/services/sync_service.py index 0567f38..9b87a6d 100644 --- a/leggend/services/sync_service.py +++ b/leggend/services/sync_service.py @@ -68,6 +68,9 @@ class SyncService: account_details.get("institution_id") ) balances_with_account_info["iban"] = account_details.get("iban") + balances_with_account_info["account_status"] = ( + account_details.get("status") + ) await self.database.persist_balance( account_id, balances_with_account_info )