getAccounts method

List<String>? getAccounts()

Implementation

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

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