mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-30 15:39:25 +00:00
3006679560
* Change receive screen ui * Upgrade flutter packages * revert Upgrade flutter packages * revert Upgrade flutter packages * Adjust flow for anon invoice page navigation * Add receive screen ui * Implement anonpay invoice * Add invoice detail to transactions page * Implement donation link * Fix transaction filter and details view * Save donation link * Fix transaction display issues * Fix formatting * Fix merge conflict * Fix localization * Fix transaction amount display * Fix transaction limit for fiat * Update fix from code review * Fix issues from code review * Make amountTo nullable to avoid potential * Remove encoding for description in donation link * Remove optional params from request * Fix QR image version * Refactor QRCode, fix issues from code review * Pass version to QRCode full page --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
34 lines
1 KiB
Dart
34 lines
1 KiB
Dart
import 'dart:async';
|
|
import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart';
|
|
import 'package:cake_wallet/view_model/dashboard/anonpay_transaction_list_item.dart';
|
|
import 'package:hive/hive.dart';
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
part 'anonpay_transactions_store.g.dart';
|
|
|
|
class AnonpayTransactionsStore = AnonpayTransactionsStoreBase with _$AnonpayTransactionsStore;
|
|
|
|
abstract class AnonpayTransactionsStoreBase with Store {
|
|
AnonpayTransactionsStoreBase({
|
|
required this.anonpayInvoiceInfoSource,
|
|
}) : transactions = <AnonpayTransactionListItem>[] {
|
|
anonpayInvoiceInfoSource.watch().listen(
|
|
(_) async => await updateTransactionList(),
|
|
);
|
|
updateTransactionList();
|
|
}
|
|
|
|
Box<AnonpayInvoiceInfo> anonpayInvoiceInfoSource;
|
|
|
|
@observable
|
|
List<AnonpayTransactionListItem> transactions;
|
|
|
|
@action
|
|
Future<void> updateTransactionList() async {
|
|
transactions = anonpayInvoiceInfoSource.values
|
|
.map(
|
|
(transaction) => AnonpayTransactionListItem(transaction: transaction),
|
|
)
|
|
.toList();
|
|
}
|
|
}
|