request method

  1. @override
Future request({
  1. String? chainId,
  2. required SessionRequestParams request,
})
override

Implementation

@override
Future<dynamic> request({
  String? chainId,
  required SessionRequestParams request,
}) async {
  if (_serviceNotReady) {
    throw Exception('Service is not ready');
  }
  //
  await _awaitReadyness.future;
  _requestCompleter = Completer<dynamic>();
  // if (chainId != _connectionChainId && chainId != null) {
  //   await switchNetwork(chainId: chainId);
  // }
  await _rpcRequest(request.toJson());
  return await _requestCompleter.future;
}