admin user able to create test txs

This commit is contained in:
davmar
2026-09-10 23:18:24 +02:00
parent c4f0ca785e
commit f8e293f823
13 changed files with 507 additions and 111 deletions
+2 -18
View File
@@ -65,14 +65,7 @@ class BankCache {
'balanceType': balance!.balanceType,
},
'transactions': [
for (final tx in transactions)
{
'date': tx.date,
'description': tx.description,
'amount': tx.amount,
'currency': tx.currency,
'pending': tx.pending,
},
for (final tx in transactions) tx.toJson(),
],
};
@@ -258,16 +251,7 @@ class StorageService {
}
Future<void> saveImportedTransactions(List<BankTransaction> txs) async {
final encoded = [
for (final tx in txs)
{
'date': tx.date,
'description': tx.description,
'amount': tx.amount,
'currency': tx.currency,
'pending': tx.pending,
},
];
final encoded = [for (final tx in txs) tx.toJson()];
final json = await compute(jsonEncode, encoded);
await _prefs.setString(StorageKeys.importedTransactions, json);
}