eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

extended_asset and extended_symbol are not returned as a formatted string when read from tables

Open prcolaco opened this issue 3 years ago • 0 comments

Version of EOSJS any

Describe the bug When using these extended types (extended_asset and extended_symbol) one must use a string like '100.0000 [email protected]', or '4,[email protected]' when passing as arguments to actions, but the inverse conversion is not made when reading them from tables, as opposed to regular asset and symbol types which are converted back to string format as expected.

To Reproduce Steps to reproduce the behavior:

  1. Push an action that stores an eosio::extended_xxx in a table
  2. Read from said table the field and receive a JSON object instead of a string (as occurs in asset or symbol)

Expected behavior It was expected to have similar behaviour as their regular counter parties asset and symbol. If you send a string, it is expected to receive a string in the same format back when reading.

Desktop (please complete the following information): any

Smartphone (please complete the following information): any

Additional context It seems that the conversion implementation on the reading part was missed when adding support to these extended types.

prcolaco avatar Sep 15 '20 10:09 prcolaco