fetchRewardTxs static method

Future<Map?> fetchRewardTxs(
  1. SubScanRequestParams para
)

Implementation

static Future<Map?> fetchRewardTxs(SubScanRequestParams para) async {
  String url = '${getSnEndpoint(para.network!)}/account/reward_slash';
  Map params = {
    "address": para.address,
    "page": para.page,
    "row": para.row,
  };
  String body = jsonEncode(params);
  Response res =
      await post(Uri.parse(url), headers: post_headers, body: body);
  final obj = await compute(jsonDecode, res.body);
  if (para.sendPort != null) {
    para.sendPort!.send(obj['data']);
  }
  return obj['data'];
}