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
+19
View File
@@ -722,6 +722,25 @@ class TxMetaController extends ChangeNotifier {
_schedulePersist(invalidateLabels: false);
}
/// Move per-tx annotations when an admin test transaction's id changes.
Future<void> rekeyTransaction(String fromId, String toId) async {
if (fromId == toId || fromId.isEmpty || toId.isEmpty) return;
final stored = _byId.remove(fromId);
if (stored != null) {
_byId[toId] = stored;
}
_labelIdsByTxCache = null;
_schedulePersist(invalidateLabels: true);
}
/// Drop per-tx annotations for a deleted admin test transaction.
Future<void> clearTransactionMeta(String txId) async {
if (txId.isEmpty) return;
if (_byId.remove(txId) == null) return;
_labelIdsByTxCache = null;
_schedulePersist(invalidateLabels: true);
}
Future<void> setNotes(
BankTransaction tx,
String notes, {