feat(frontend): show how long each priority is expected to take - #13936
Draft
AntonioVentilii wants to merge 5 commits into
Draft
feat(frontend): show how long each priority is expected to take#13936AntonioVentilii wants to merge 5 commits into
AntonioVentilii wants to merge 5 commits into
Conversation
…times # Conflicts: # src/frontend/src/eth/components/fee/EthFeePriorityOption.svelte # src/frontend/src/tests/eth/components/fee/EthFeePriority.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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;
getSuggestedFeeDatadiscarded them.Changes
maxWaitTimeEstimateis carried out of the REST layer aswaitTimeMsonEthFeePriorities, kept besideperPriorityrather than inside it because those entries are spread straight intoTransactionFeeData, which has no place for a wait estimate.secondsToDurationhelper and its existingtemporal.seconds_to_durationi18n keys, so no new copy.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.