explorer: Auto-update transactions until they reach max confirmation#11841
Conversation
|
Cool, so now we have the edge case for when a transaction gets stuck in 0 confirmation land covered, and the bailout state lives back in the component. |
| <ErrorCard | ||
| retry={refreshStatus} | ||
| text="Details are not available until the transaction reaches MAX confirmations" | ||
| /> |
There was a problem hiding this comment.
Why did you decide to remove this state? I liked that it communicated to a user why they weren't seeing the full details for a transaction.
There was a problem hiding this comment.
I think we discussed this earlier this week or last. We decided to show the loading card instead of having a "details are not available" w/ the retry button, since an auto refresh would be in process and the "retry" button wouldn't make much sense.
There was a problem hiding this comment.
Another option would be to show the message "Details are not available until the transaction reaches MAX confirmations" w/o retry (with a loading indicator?).
There was a problem hiding this comment.
Went ahead and added that back!
There was a problem hiding this comment.
Ah ok I missed your reply here:
So basically, there are three overall states: transaction not found, transaction hasn't reached max (auto refresh active), transaction has max confirmations.
The "details are not available until the transaction reaches MAX confirmations" error card would be eliminated.
I think there is one more state when we bail out from auto refresh. I think it would be sufficient to show this error card when the auto refresh is bailed out.
Another option would be to show the message "Details are not available until the transaction reaches MAX confirmations" w/o retry (with a loading indicator?).
But this sounds good too! Up to you. Dropping the retry in either case sounds good
There was a problem hiding this comment.
Oh I see you went with showing the message during auto refresh, nice!
| if (autoRefresh === AutoRefresh.BailedOut || !status?.data?.info) { | ||
| return null; | ||
| } else if (!details) { | ||
| } else if (autoRefresh === AutoRefresh.Active) { |
There was a problem hiding this comment.
I still think it would be nice to show this error card when auto refresh has been bailed out, thoughts?
There was a problem hiding this comment.
I agree! I added that case. If it doesn't make sense to have a retry button I can pull that out.
There was a problem hiding this comment.
Retry makes sense! But it should be refreshStatus because otherwise the details could get refreshed but the status would be still stuck showing 0 confirmations
Problem
When a transaction that hasn't reached max confirmations is entered, the user needs to mash the refresh button on the right until it reaches max confirmation.
Summary of Changes
Status card auto-refreshes every 2 seconds until the confirmation max is reached. Account card will display loading card while auto-refresh is in process. A loading indicator is placed in the top right. Once full confirmation is complete, the refresh button becomes available. Autorefresh will bailout if confirmations stuck at 0 due to transaction landing in a fork.
Fixes #11760