Skip to content

Improve swapper tx link reliability by making it handle not yet seen TX's #10093

@premiumjibles

Description

@premiumjibles

Summary

Currently it's possible to get into a state in the swapper where it essentialy provides you a dead link initially on certain swap pairs. This issue effects both the swapper and txLinks generated for the action centre "view transaction" button.

Notes from Gomes 👇

getTxLink it too optimistic and won't work when Tx isn't yet seen

i.e broadcast a THOR Tx on a slow conf chain like BTC, notice a dead viewblock link until seen and indexed by THOR network, and eventually by viewblock midgard indexer

Probably worth following up on logic that checks on the granular status of the Tx (getLatestThorTxStatusMessage / checkTradeStatus) - basically, if the Tx status is anything but seen, we should use the L1 explorer link, not Viewblock.

Same for Butter and Relay FWIW (though Butter has had its Tx link removed so a non-issue).

Steps to reproduce

  • Do an inbound THOR swap on a chain that's low to 1 confirmation (e.g any UTXO really) - Maybe LTC -> RUNE

Notice Viewblock link is dead until 1 confirmation since not yet seen on the THOR network

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions