Skip to content

[D2] Allow NFT amounts to be float numbers #573

@ipaleka

Description

@ipaleka

Right now if a float is sent in API response then an error is raised, like in this example

https://www.asastats.com/6IW52JMHBXAWPFIAZTP6EVHZT43LA2HX7DKGOV56BXJCWCGGD2BZIV625I

for the 468359924:

  "value": 13344.0,
  "collection": "Alchemon",
  "amount": 238.0,
  "nfts": [{
  ...
...
{
  "value": 0,
  "id": 468359924,
  "amount": 0.01,
  "nft": {
    "id": 468359924,
    "name": "ART: MagicaL Bolt",
    "unit": "ART6",
    ...

As a temporary solution, we've prevented raising error by converting those amounts to integers in API responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivedAddressed and closed issue changes to archived after being rewardedbugSomething isn't working on the ASA Stats websitemedium priorityThis should be done in a reasonable amount of timemobileMobile app specifics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions