Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

NicolaLS
Copy link
Contributor

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.

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
Copy link
Collaborator

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
Copy link
Contributor Author

NicolaLS commented Sep 9, 2024

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.

@NicolaLS NicolaLS closed this Sep 9, 2024
@NicolaLS NicolaLS reopened this Sep 9, 2024
@NicolaLS NicolaLS closed this Sep 9, 2024
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.

2 participants