threshold-network / token-dashboard

22 stars 23 forks source link

Fix infinite PENDING status for deposits swept before optimistc minting #722

Open michalsmiarowski opened 7 months ago

michalsmiarowski commented 7 months ago

There are situations where sweeping might occur before optimistic minting for the given deposit. In rare cases, that may happen naturally. More often, it happens when the deposit BTC transaction hangs in the mempool for more than 6 hours (e.g. due to low fee) and disappears from the radar for optimistic minters. In such case, there are not OptimisticMintingRequested and OptimisticMintingFinalized events for such deposits.

These sitations are not reflected in the UI properly, because we set the status for the given deposit based on those two events (OptimisticMintingRequested and OptimisticMintingFinalized) thus resulting in infinite PENDING status for deposits that are already swept in Bridge Activity and in Deposit Details page.

image

image