cake_wallet/cw_zano/lib/zano_transaction_history.dart

28 lines
795 B
Dart
Raw Normal View History

2023-10-02 14:17:35 +00:00
import 'dart:core';
import 'package:mobx/mobx.dart';
import 'package:cw_core/transaction_history.dart';
2024-03-19 15:51:08 +00:00
import 'package:cw_zano/model/zano_transaction_info.dart';
2023-10-02 14:17:35 +00:00
part 'zano_transaction_history.g.dart';
class ZanoTransactionHistory = ZanoTransactionHistoryBase
with _$ZanoTransactionHistory;
abstract class ZanoTransactionHistoryBase
extends TransactionHistoryBase<ZanoTransactionInfo> with Store {
ZanoTransactionHistoryBase() {
transactions = ObservableMap<String, ZanoTransactionInfo>();
}
@override
Future<void> save() async {}
@override
void addOne(ZanoTransactionInfo transaction) =>
transactions[transaction.id] = transaction;
@override
void addMany(Map<String, ZanoTransactionInfo> transactions) =>
this.transactions.addAll(transactions);
}