getTransactionsByAccount method
Return an array of Transaction objects based on the specified parameters, or an empty array if none found. @param {string} accountAddress The account address to get the transactions of. @returns {Promise<Array<Transaction>|null>} An array of Transaction objects, or a TransactionError for error.
Implementation
Future<List<RosettaTransaction>> getTransactionsByAccount(
String accountAddress,
) async {
final response = await transactionsByAccount(accountAddress);
final transactions = response.transactions
.map(
(blockTransaction) => RosettaTransaction(
blockTransaction.transaction,
blockTransaction.blockIdentifier.index,
),
)
.toList();
return transactions.reversed.toList();
}