BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
254 stars 82 forks source link

frontend: don't convert to fiat twice in send #2868

Closed NicolaLS closed 1 month ago

NicolaLS commented 2 months ago

The fiat amount does not have to be calculated when receiving the response from submitting the tx. proposal because the result.amount is exactly the same as the amount in the components state. When this state is set we already convert to fiat.

thisconnect commented 1 month ago

Unfortunately it is currently needed with this change it introduces a bug:

when the user clicks "Send all" / "Send selected coin" the fiat field isn't updated.

NicolaLS commented 1 month ago

Unfortunately it is currently needed with this change it introduces a bug:

when the user clicks "Send all" / "Send selected coin" the fiat field isn't updated.

@thisconnect oh right...mb should have noticed this. Looks like there is no way around it actually because we would not want to calculate the "all" amount in the frontend, we just propse with "sendall: true" and then use the returned amount.