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
|
@override
|
||||||
Future<Map<String, WowneroTransactionInfo>> fetchTransactions() async {
|
Future<Map<String, WowneroTransactionInfo>> fetchTransactions() async {
|
||||||
transaction_history.refreshTransactions();
|
transaction_history.refreshTransactions();
|
||||||
return _getAllTransactionsOfAccount(walletAddresses.account?.id)
|
return (await _getAllTransactionsOfAccount(walletAddresses.account?.id))
|
||||||
.fold<Map<String, WowneroTransactionInfo>>(<String, WowneroTransactionInfo>{},
|
.fold<Map<String, WowneroTransactionInfo>>(<String, WowneroTransactionInfo>{},
|
||||||
(Map<String, WowneroTransactionInfo> acc, WowneroTransactionInfo tx) {
|
(Map<String, WowneroTransactionInfo> acc, WowneroTransactionInfo tx) {
|
||||||
acc[tx.id] = tx;
|
acc[tx.id] = tx;
|
||||||
|
@ -586,9 +586,9 @@ abstract class WowneroWalletBase
|
||||||
String getSubaddressLabel(int accountIndex, int addressIndex) =>
|
String getSubaddressLabel(int accountIndex, int addressIndex) =>
|
||||||
wownero_wallet.getSubaddressLabel(accountIndex, addressIndex);
|
wownero_wallet.getSubaddressLabel(accountIndex, addressIndex);
|
||||||
|
|
||||||
List<WowneroTransactionInfo> _getAllTransactionsOfAccount(int? accountIndex) =>
|
Future<List<WowneroTransactionInfo>> _getAllTransactionsOfAccount(int? accountIndex) async =>
|
||||||
transaction_history
|
(await transaction_history
|
||||||
.getAllTransactions()
|
.getAllTransactions())
|
||||||
.map(
|
.map(
|
||||||
(row) => WowneroTransactionInfo(
|
(row) => WowneroTransactionInfo(
|
||||||
row.hash,
|
row.hash,
|
||||||
|
|
Loading…
Reference in a new issue