mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
use async code
This commit is contained in:
parent
ca2c16acf0
commit
13b608495b
1 changed files with 4 additions and 4 deletions
|
@ -557,7 +557,7 @@ abstract class WowneroWalletBase
|
|||
@override
|
||||
Future<Map<String, WowneroTransactionInfo>> fetchTransactions() async {
|
||||
transaction_history.refreshTransactions();
|
||||
return _getAllTransactionsOfAccount(walletAddresses.account?.id)
|
||||
return (await _getAllTransactionsOfAccount(walletAddresses.account?.id))
|
||||
.fold<Map<String, WowneroTransactionInfo>>(<String, WowneroTransactionInfo>{},
|
||||
(Map<String, WowneroTransactionInfo> 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<WowneroTransactionInfo> _getAllTransactionsOfAccount(int? accountIndex) =>
|
||||
transaction_history
|
||||
.getAllTransactions()
|
||||
Future<List<WowneroTransactionInfo>> _getAllTransactionsOfAccount(int? accountIndex) async =>
|
||||
(await transaction_history
|
||||
.getAllTransactions())
|
||||
.map(
|
||||
(row) => WowneroTransactionInfo(
|
||||
row.hash,
|
||||
|
|
Loading…
Reference in a new issue