mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 21:19:37 +00:00
28 lines
790 B
Dart
28 lines
790 B
Dart
import 'dart:core';
|
|
import 'package:mobx/mobx.dart';
|
|
import 'package:cw_core/transaction_history.dart';
|
|
import 'package:cw_nano/nano_transaction_info.dart';
|
|
|
|
part 'nano_transaction_history.g.dart';
|
|
|
|
class NanoTransactionHistory = NanoTransactionHistoryBase
|
|
with _$NanoTransactionHistory;
|
|
|
|
abstract class NanoTransactionHistoryBase
|
|
extends TransactionHistoryBase<NanoTransactionInfo> with Store {
|
|
NanoTransactionHistoryBase() {
|
|
transactions = ObservableMap<String, NanoTransactionInfo>();
|
|
}
|
|
|
|
@override
|
|
Future<void> save() async {}
|
|
|
|
@override
|
|
void addOne(NanoTransactionInfo transaction) =>
|
|
transactions[transaction.id] = transaction;
|
|
|
|
@override
|
|
void addMany(Map<String, NanoTransactionInfo> transactions) =>
|
|
this.transactions.addAll(transactions);
|
|
|
|
}
|