Uniswap / Uniswap/interface

Incorrect Currency Formatting

Open
#4,874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Bug Description
Throughout the interface, currency amounts are formatted incorrectly where the currency code is written after the amount. In English, currencies codes and symbols are always written before the amount, with codes being spaced and symbols being unspaced. For example, in the example itself, it reads "$8.91", and it would be written as "USD 8.91" if it was written with its code; one does not write "8.91$" or "8.91 USD".

Steps to Reproduce
As just one example:

  1. Go to the Uniswap App.
  2. Choose a from asset and an amount.
  3. Choose a to asset and an amount.
  4. Click Swap.

Expected Behaviour
The codes of all the currencies should be formatted on the left in the drop-down selector, and when written the codes should all precede the amounts. For example in the screenshotted example, it should read "DAI 1 = ETH 0.00078". As the linked article outlines, for the other European or other languages where the convention is to put the code after the amount, that should be followed.

Additional Context
Screenshot 2022-10-11 184104

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Uniswap App swap flow described in the reproduction steps, tracing the currency formatting used by the asset selector and swap summary. Verify code placement against the USD, DAI, and ETH examples, and check that the expected language-specific convention is preserved before considering the interface formatting consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.