eosrio / hyperion-history-api

Scalable Full History API Solution for Antelope (former EOSIO) based blockchains
https://hyperion.docs.eosrio.io
Other
125 stars 72 forks source link

[BUG] Invalid 0 precision token handling /get_tokens #131

Open Avm07 opened 1 year ago

Avm07 commented 1 year ago

For 0 precision tokens missing precision field at /get_tokens response data

Example:

curl -X 'GET' \
  'https://hyperion.paycash.online/v2/state/get_tokens?account=i.list' \
  -H 'accept: application/json'

Logical estimate that field will be present:

{
      "symbol": "LQAG",
      "precision": 0,
      "amount": 0,
      "contract": "swap.pcash"
}
chuck-h commented 1 year ago

FYI @igorls looked at this a few months ago and thought it was ok image

Avm07 commented 1 year ago

FYI @igorls looked at this a few months ago and thought it was ok image

I talked before with him and it's not right. Check the contract source, asset always has a precision field and amount. Displaying precision = 0 is a correct statement. Undefined is not acceptable in this case.

chuck-h commented 1 year ago

@Avm07 I agree with you it's not right and I'm glad to hear that @igorls agrees now too.

igorls commented 1 year ago

Thanks for opening the issue, we will get that patched soon