Skip to content

Add unit switching within the "Amount" input #2511

@stackingsaunter

Description

@stackingsaunter

Currently there are two important missing features while creating an invoice that are often used and requested:

  • creating invoiced priced in fiat currency
  • being able to see/use units in BTC not sats

Let's add both being able to set an input by user in fiat and also change sats to BTC.
You can play how desired outcome should work in this prototype

You can see the behaviour flow and hanoff HERE.

Changes description:

  1. Add trailing users input "sats" or "BTC" unit:
    image

  2. Those units should be clickable and change to BTC (and vice versa)
    image

  3. Clicking on fiat unit should switch it's place with bitcoin units, thus making it possible for the user to create an invoice priced in fiat:
    image

  4. If fiat unit has a symbol, we show it in front of the number. If it uses 3 letters (USD, ARS, TRY, PLN etc) we should show it after the fiat amount:
    image

  5. All units have hover states I also found one colouring inconsistency. Amount input in dark mode uses "gray" instead of "neutral" like all the rest units, so we could upgrade it to "neutral" with PR related to this issue^
    image Screenshot 2023-06-24 at 22 01 02

Handoff

image
image
image
image

Metadata

Metadata

Assignees

Labels

frontendAll things frontend development related

Type

No type

Projects

Status

📝 To-Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions