From 13b608495ba6b24332089902a93527bf5eb62b40 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Sun, 15 Dec 2024 10:00:33 -0500 Subject: [PATCH] use async code --- cw_wownero/lib/wownero_wallet.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cw_wownero/lib/wownero_wallet.dart b/cw_wownero/lib/wownero_wallet.dart index c4c79af11..790ac9550 100644 --- a/cw_wownero/lib/wownero_wallet.dart +++ b/cw_wownero/lib/wownero_wallet.dart @@ -557,7 +557,7 @@ abstract class WowneroWalletBase @override Future> fetchTransactions() async { transaction_history.refreshTransactions(); - return _getAllTransactionsOfAccount(walletAddresses.account?.id) + return (await _getAllTransactionsOfAccount(walletAddresses.account?.id)) .fold>({}, (Map acc, WowneroTransactionInfo tx) { acc[tx.id] = tx; @@ -586,9 +586,9 @@ abstract class WowneroWalletBase String getSubaddressLabel(int accountIndex, int addressIndex) => wownero_wallet.getSubaddressLabel(accountIndex, addressIndex); - List _getAllTransactionsOfAccount(int? accountIndex) => - transaction_history - .getAllTransactions() + Future> _getAllTransactionsOfAccount(int? accountIndex) async => + (await transaction_history + .getAllTransactions()) .map( (row) => WowneroTransactionInfo( row.hash,