mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-24 04:29:28 +00:00
28 lines
801 B
Dart
28 lines
801 B
Dart
|
import 'dart:core';
|
||
|
import 'package:mobx/mobx.dart';
|
||
|
import 'package:cw_core/transaction_history.dart';
|
||
|
import 'package:cw_haven/haven_transaction_info.dart';
|
||
|
|
||
|
part 'haven_transaction_history.g.dart';
|
||
|
|
||
|
class HavenTransactionHistory = HavenTransactionHistoryBase
|
||
|
with _$HavenTransactionHistory;
|
||
|
|
||
|
abstract class HavenTransactionHistoryBase
|
||
|
extends TransactionHistoryBase<HavenTransactionInfo> with Store {
|
||
|
HavenTransactionHistoryBase() {
|
||
|
transactions = ObservableMap<String, HavenTransactionInfo>();
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Future<void> save() async {}
|
||
|
|
||
|
@override
|
||
|
void addOne(HavenTransactionInfo transaction) =>
|
||
|
transactions[transaction.id] = transaction;
|
||
|
|
||
|
@override
|
||
|
void addMany(Map<String, HavenTransactionInfo> transactions) =>
|
||
|
this.transactions.addAll(transactions);
|
||
|
}
|