fetchRewardTxsAsync method
Implementation
Future<Map> fetchRewardTxsAsync({
int page = 0,
int size = tx_list_page_size,
String? sender,
String network = 'kusama',
}) async {
Completer completer = new Completer<Map>();
ReceivePort receivePort = ReceivePort();
Isolate isolateIns = await Isolate.spawn(
SubScanApi.fetchRewardTxs,
SubScanRequestParams(
sendPort: receivePort.sendPort,
network: network,
address: sender,
page: page,
row: size,
));
receivePort.listen((msg) {
receivePort.close();
isolateIns.kill(priority: Isolate.immediate);
completer.complete(msg);
});
return completer.future as FutureOr<Map<dynamic, dynamic>>;
}