hathor-core icon indicating copy to clipboard operation
hathor-core copied to clipboard

refactor: use single source of information for tx APIs

Open pedroferreira1 opened this issue 4 years ago • 1 comments

Nowadays APIs /transaction and /thin_wallet/address_history return transaction data that come from different methods, then can have differences. We must get information from those APIs from a single method and check if other APIs are using different methods as well

pedroferreira1 avatar Oct 22 '21 01:10 pedroferreira1

What do you mean by "source of information"? The source itself is the metadata in the storage which is the only source of truth used. However both APIs do present it differently, the /thin_wallet/address_history has a history field with a list of tx.to_json_extended(), while /transaction API splits the information in tx and meta fields, formatting them in a custom way, apparently unique to this endpoint.

We could standardize it. But I think this is probably better left for a v2 API.

jansegre avatar Oct 03 '24 14:10 jansegre