Render THORChain swaps as trades
Overview
Currently, we have tx parsers to identify 0x and CoW trades and render them as a trade in the transaction history.
We want to do the same for THORChain trades.
References and additional details
references transactions for the thorchain trade below
- https://etherscan.io/tx/0x86f4086ab59b105415bc2aaac226a4c7efdd939ab2eb8ea05ecf95428dfb75db
- https://blockchair.com/bitcoin-cash/transaction/abe2a8cf3592dfae04624a7b7916f546c32452b85ff17d4b6f60d7129d88d52c
when implementing this, consider
- some sort of generic "blockchain event" type interface that can support the concept of other activities, e.g. EPNS notifications in the same chronological view
- a trade should be defined as an event that can contain 1 or more transactions, e.g. a 0x/cow swap is a single tx, a thorchain trade is two.
- provision for osmosis trades must also be supported in your design architecture
leverage RTK query and hit the lcd endpoint on the node or midgard, to obtain trades a given address has done, probably don't do this in lib for performance reasons.
Acceptance Criteria
- We can render THORChain trades in a single row
- We dedupe them and avoid rendering multiple instances of the same trade
Need By Date
No response
Screenshots/Mockups
how we currently render 0x/cowswap trades
how we currently render thorchain trades
Estimated effort
No response
@twblack88 - can you comment on this? still something we want to explore or stale and should be closed?
@kaladinlight will be able to bring more context on this as this effectively requires linking THOR Txs between each other i.e a trade consisting of one/many (for UTXOs) inbound Txs, and an outbound Tx at unchained-client Tx parser level.
I'd say this is a major requirement, especially with the current outbound delays and is a key component in really allowing us to deliver the best THOR experience
There are levels to this idea, but I have a personal issue tracked related to getting the thorchain tx parsing updated for the current feature set as a starting point that I can create a formal issue for. This would at least be able to tag each transaction as Swap In, Swap Out, Deposit, etc.
The actual linking of transactions is a whole separate task. There is feasibility to this idea certainly and would improve our UX, so I think this is still worth exploring, but probably best updated to a spike ticket for starters
@kaladinlight do we want to close this since we now have unchained-client parsing of swap Txs, albeit without the linking of Txs which is indeed a whole different task (and effort)?
closing as the new UI makes it pretty clear but we don't need to add extra exapnding/collapsing .
Defer to users asking for that level of complexity.