getAddress method

String? getAddress(
  1. String namespace
)

Implementation

String? getAddress(String namespace) {
  if (sessionService.noSession) {
    return null;
  }
  if (sessionService.isCoinbase) {
    return _coinbaseData!.address;
  }
  if (sessionService.isMagic) {
    return _magicData!.address;
  }
  final ns = namespaces?[namespace];
  final accounts = ns?.accounts ?? [];
  if (accounts.isNotEmpty) {
    return NamespaceUtils.getAccount(accounts.first);
  }
  return null;
}