getApprovedEvents method

List<String>? getApprovedEvents()

Implementation

List<String>? getApprovedEvents() {
  if (sessionService.noSession) {
    return null;
  }
  if (sessionService.isCoinbase) {
    return [];
  }
  if (sessionService.isMagic) {
    return [];
  }

  final sessionNamespaces = _sessionData!.namespaces;
  final namespace = sessionNamespaces[CoreConstants.namespace];
  final eventsList = namespace?.events.toSet().toList();
  return eventsList ?? [];
}