Skip to content

Make getTLDs request more lightweight by adding a new parameter called includeNumberOfAliases #827

@map1336

Description

@map1336

Is your feature request related to a problem? Please describe.

Currently, the getTLDs request shows all available TLDs registered onchain

image

The issue is that that each TLD includes the number of aliases registered with it by default

{
  "tlds": [
    {
      "account": "0",
      "accountRS": "S-2222-2222-2222-22222",
      "aliasName": "signum",
      "timestamp": 0,
      "alias": "0",
      "numberOfAliases": 62004
    },
  /// Remaining TLDs...
  ],
  "requestProcessingTime": 2639
}

This is a pretty heavy operation that should be optimized by optionally showing the numberOfAliases
See that requestProcessingTime shows the queries lasted almost 3 seconds, there has been cases where it lasted up to 5 seconds

Describe the solution you'd like
I think there should be a new parameter for actually not showing the number aliases

Something like this:
image

As an example, if the user set that new parameter to false, number of aliases will not be shown

    {
      "account": "0",
      "accountRS": "S-2222-2222-2222-22222",
      "aliasName": "signum",
      "timestamp": 0,
      "alias": "0"
    }

Additional context
By default this parameter should be true in order to prevent breaking changes on multiple DApps that may use this feature.

Currently i inspected the code on SignumSwap and this is the result:
SignumSwap makes that request, but does not use the numberOfAliases property

Second Additional context
Most wallets may not use that property at all. Example: Signum Mobile Wallet will not use the numberOfAliases property

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIssues related to the Node's APIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions