Zondax / namadexer

Namada indexer
39 stars 57 forks source link

Include transaction type in the transactions view #193

Closed cryptosystems6300 closed 5 months ago

cryptosystems6300 commented 5 months ago

As a data consumer of the Namadexer, I would like to have a dedicated field on transaction view, such that I know which transactions are transfers, bondings, unbodings, governance votes, etc.

If I look at the transaction history of an address, this is not obvious and must be guessed by looking at the fields of the data object. https://namada-testnet-indexer.itrocket.net/address/tnam1qpuxpeuwxwdpuy3tf7fylnyw43y3ccsyzg8nxr30

rllola commented 5 months ago

Hey! You can check the code value to know which kind of transaction it is. It should match the checksums.json one. But to improve use we can add a field that contained the type of transaction in a readable way like tx_transfer. Someone started a PR but unfortunately never finished it.

opsecx commented 5 months ago

Is there a lookup table somewhere for mapping specific code (and return code) to type of transaction / completion? Think a choice needs to be made on data model re this. Wouldn't mind helping build it, but imo the first thing is to decide on data model.

rllola commented 5 months ago

This PR add a column that show in a human readable string the type of transaction you will have in data. https://github.com/Zondax/namadexer/pull/197

This avoid for lookup table and makes things more friendly.