mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Update dashboard_view_model.dart
This commit is contained in:
parent
e3e0845d8e
commit
8009ee061c
1 changed files with 27 additions and 26 deletions
|
@ -253,33 +253,34 @@ abstract class DashboardViewModelBase with Store {
|
||||||
_checkMweb();
|
_checkMweb();
|
||||||
});
|
});
|
||||||
|
|
||||||
connectMapToListWithTransform(
|
_transactionDisposer?.reaction.dispose();
|
||||||
appStore.wallet!.transactionHistory.transactions,
|
|
||||||
transactions,
|
_transactionDisposer = reaction(
|
||||||
(TransactionInfo? transaction) => TransactionListItem(
|
(_) => appStore.wallet!.transactionHistory.transactions.values.toList(),
|
||||||
transaction: transaction!,
|
(List<TransactionInfo> txs) {
|
||||||
balanceViewModel: balanceViewModel,
|
|
||||||
settingsStore: appStore.settingsStore,
|
transactions.clear();
|
||||||
key: ValueKey(
|
|
||||||
'${_wallet.type.name}_transaction_history_item_${transaction.id}_key',
|
transactions.addAll(
|
||||||
|
txs.where((tx) {
|
||||||
|
if (wallet.type == WalletType.monero) {
|
||||||
|
return monero!.getTransactionInfoAccountId(tx) == monero!.getCurrentAccount(wallet).id;
|
||||||
|
}
|
||||||
|
if (wallet.type == WalletType.wownero) {
|
||||||
|
return wow.wownero!.getTransactionInfoAccountId(tx) == wow.wownero!.getCurrentAccount(wallet).id;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}).map(
|
||||||
|
(tx) => TransactionListItem(
|
||||||
|
transaction: tx,
|
||||||
|
balanceViewModel: balanceViewModel,
|
||||||
|
settingsStore: appStore.settingsStore,
|
||||||
|
key: ValueKey('${wallet.type.name}_transaction_history_item_${tx.id}_key'),
|
||||||
),
|
),
|
||||||
), filter: (TransactionInfo? transaction) {
|
),
|
||||||
if (transaction == null) {
|
);
|
||||||
return false;
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
final wallet = _wallet;
|
|
||||||
if (wallet.type == WalletType.monero) {
|
|
||||||
return monero!.getTransactionInfoAccountId(transaction) ==
|
|
||||||
monero!.getCurrentAccount(wallet).id;
|
|
||||||
}
|
|
||||||
if (wallet.type == WalletType.wownero) {
|
|
||||||
return wow.wownero!.getTransactionInfoAccountId(transaction) ==
|
|
||||||
wow.wownero!.getCurrentAccount(wallet).id;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (hasSilentPayments) {
|
if (hasSilentPayments) {
|
||||||
silentPaymentsScanningActive = bitcoin!.getScanningActive(wallet);
|
silentPaymentsScanningActive = bitcoin!.getScanningActive(wallet);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue