getSentReceipts static method

Future<List<CommercioDocReceipt>> getSentReceipts({
  1. required String address,
  2. required NetworkInfo networkInfo,
  3. Client? client,
})

Returns the list of all the CommercioDocReceipt that have been sent from the given address.

Implementation

static Future<List<CommercioDocReceipt>> getSentReceipts({
  required String address,
  required NetworkInfo networkInfo,
  http.Client? client,
}) async {
  final url = Uri.parse('${networkInfo.lcdUrl}/receipts/$address/sent');
  final response = await Network.queryChain(url, client: client) as List;

  return response.map((json) => CommercioDocReceipt.fromJson(json)).toList();
}