Description
In src/pages/SwapDetailPage.tsx (~lines 263-268), the timeout block estimate is computed as:
formatBlockEstimate(
parseInt(swap.timeoutBlock) - parseInt(swap.initiatedBlock),
)
This computes timeoutBlock - initiatedBlock, which is the total swap window from start to expiry. It does not represent how much time remains. A user viewing a swap that was initiated 100 blocks ago with a 120-block window would see "~20 min" on the timeout line, but the actual remaining time is only a few blocks.
The label currently says window, which is ambiguous. There is no currentBlock available in the page's data model to compute true remaining time.
Steps to Reproduce
- Open a swap detail page for an active swap.
- Observe the timeout block estimate in parentheses next to the timeout block number.
- The displayed estimate reflects the total window duration (timeoutBlock - initiatedBlock), not the remaining time.
Expected Behavior
The label should make clear this is the total window duration, not remaining time — or ideally compute timeoutBlock - currentBlock once a current block value is available.
Actual Behavior
The label reads window implying it is remaining time, which misleads users who are monitoring an active swap near expiry.
Description
In
src/pages/SwapDetailPage.tsx(~lines 263-268), the timeout block estimate is computed as:This computes
timeoutBlock - initiatedBlock, which is the total swap window from start to expiry. It does not represent how much time remains. A user viewing a swap that was initiated 100 blocks ago with a 120-block window would see "~20 min" on the timeout line, but the actual remaining time is only a few blocks.The label currently says
window, which is ambiguous. There is nocurrentBlockavailable in the page's data model to compute true remaining time.Steps to Reproduce
Expected Behavior
The label should make clear this is the total window duration, not remaining time — or ideally compute
timeoutBlock - currentBlockonce a current block value is available.Actual Behavior
The label reads
windowimplying it is remaining time, which misleads users who are monitoring an active swap near expiry.