emitSessionEvent method

  1. @override
Future<void> emitSessionEvent({
  1. required String topic,
  2. required String chainId,
  3. required SessionEventParams event,
})
override

Implementation

@override
Future<void> emitSessionEvent({
  required String topic,
  required String chainId,
  required SessionEventParams event,
}) async {
  _checkInitialized();
  _confirmOnlineStateOrThrow();

  await _isValidEmit(
    topic,
    event,
    chainId,
  );

  final eventRequest = WcSessionEventRequest(
    chainId: chainId,
    event: event,
  );

  await core.pairing.sendRequest(
    topic,
    MethodConstants.WC_SESSION_EVENT,
    eventRequest.toJson(),
  );
}