getAccounts method

List<String>? getAccounts()

Implementation

List<String>? getAccounts() {
  if (sessionService.noSession) {
    return null;
  }
  if (sessionService.isCoinbase) {
    return ['${CoreConstants.namespace}:$chainId:$address'];
  }
  if (sessionService.isMagic) {
    return ['${CoreConstants.namespace}:$chainId:$address'];
  }

  final sessionNamespaces = _sessionData!.namespaces;
  return sessionNamespaces[CoreConstants.namespace]?.accounts ?? [];
}