hyperion-history-api icon indicating copy to clipboard operation
hyperion-history-api copied to clipboard

[BUG] Invalid 0 precision token handling /get_tokens

Open Avm07 opened this issue 3 years ago • 4 comments

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"
}

Avm07 avatar Nov 23 '22 19:11 Avm07

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

chuck-h avatar Jan 18 '23 18:01 chuck-h

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.

Avm07 avatar Feb 06 '23 12:02 Avm07

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

chuck-h avatar Feb 06 '23 15:02 chuck-h

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

igorls avatar Feb 06 '23 15:02 igorls