Skip to content

[Feature] Json structure change proposal #11

@octavioamu

Description

@octavioamu

Feature Description

When adding new tokens to the endpoint the front end need to duplicate code making not DRY
To solve this I propose a change on the json structure to make pairs of proprieties, example of possible format:

{
  "balances": [
    {
      "symbol": "ETH",
      "count": 138714.89847312044,
      "price": 3746
    },
    {
      "symbol": "BIT",
      "count": 1000000020,
      "price": 1.8032047833
    },
    {
      "symbol": "xSUSHI",
      "count": 2132234.813768734,
      "price": 12.7604923276
    },
    {...}
  ],
  "usdTotal": 2434324234234
}

Current structure changes the names of the property making hard to create more dynamic and flexible components:

image

Additional Information

This task need to be coordinated with front end changes to avoid any break logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions