getTransactions method

Future<WalletTransactions> getTransactions(
  1. String walletId
)

Implementation

Future<WalletTransactions> getTransactions(String walletId) async {
  var headers = {'authorization': token};
  var request = dio.Dio();
  var response = await request.request(
    '$baseUrl/uw/get/transactions/$walletId',
    options: dio.Options(
      method: 'GET',
      headers: headers,
    ),
  );
  if (response.statusCode == 200) {
    return WalletTransactions.fromJson(response.data);
  } else {
    throw Exception('Failed to fetch Checklists data');
  }
}