T? getTransaction<T>(Type type, String id) { String key = _buildKey(type, id); return transactions[key] as T?; }