Skip to content

feat(frontend): show how long each priority is expected to take - #13936

Draft
AntonioVentilii wants to merge 5 commits into
mainfrom
av/evm-priority-wait-times
Draft

feat(frontend): show how long each priority is expected to take#13936
AntonioVentilii wants to merge 5 commits into
mainfrom
av/evm-priority-wait-times

Conversation

@AntonioVentilii

Copy link
Copy Markdown
Collaborator

Motivation

On several chains the three priority options quote the same fee, so the choice looks broken. Measured against the live gas API just now:

Chain tips low / med / high (gwei) med == high max wait low / med / high
Ethereum 0.00016 / 2 / 2 yes 48s / 24s / 12s
Arbitrum 0 / 0 / 0 yes 1s / 0.75s / 0.5s
BSC 0.05 / 0.05 / 0.05 yes 16s / 12s / 8s
BSC testnet 1 / 1 / 1 yes 4s / 3s / 2s
Polygon 69.7 / 81.0 / 87.5 no, 1% apart 8s / 6s / 4s
Base 0.001 / 0.0014 / 0.0026 no 8s / 6s / 4s
Sepolia 1 / 1.5 / 2 no 48s / 36s / 24s

Four of nine reachable chains return an identical tip for Normal and Fast, and Polygon's differ by so little that the fiat rounds the same. But the wait estimate differs on every single chain, including all four where the fee does not. So the tiers are meaningfully different even when the price is not, and the UI currently hides the only part that distinguishes them.

The API has always returned these values; getSuggestedFeeData discarded them.

Changes

  • maxWaitTimeEstimate is carried out of the REST layer as waitTimeMs on EthFeePriorities, kept beside perPriority rather than inside it because those entries are spread straight into TransactionFeeData, which has no place for a wait estimate.
  • Each option row shows the estimate under the fiat value, formatted with the existing secondsToDuration helper and its existing temporal.seconds_to_duration i18n keys, so no new copy.
  • Sub-second estimates round up to one second rather than to zero.

Open

The static descriptors are now contradicted by the data: Slow reads "May take hours" while Ethereum's low tier estimates 48 seconds. Worth deciding whether they stay, get replaced by the wait time, or get reworded. Not changed here.

Also still open in the spec: whether to hide or merge rows when the tiers genuinely do not separate. This PR is the softer alternative, since it gives every row something that does differ.

Tests

Fixtures across the fee, send-form, fee-service and open-crypto-pay specs carry the new field. check, check:tests, eslint and prettier clean. tests/eth: 4124 passed.

Left as a draft deliberately: the presentation is not agreed yet.
Stacked on #13935, which touches the same option row.

Base automatically changed from av/evm-priority-option-fiat-only to main September 3, 2026 07:26
…times

# Conflicts:
#	src/frontend/src/eth/components/fee/EthFeePriorityOption.svelte
#	src/frontend/src/tests/eth/components/fee/EthFeePriority.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant