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

Don't show CJ broadcasted if wallet had no input in the round #10607

Merged
merged 3 commits into from Jun 13, 2023

Conversation

turbolay
Copy link
Collaborator

@turbolay turbolay commented May 3, 2023

Fixes #9544

The issue is that the round success, just we had no input in it because we lost internet before confirming inputs (so we didnt make the round to fail). Because the ViewModel is only checking if the round failed or succeed, it will display success.

The solution is to check if we had any input in the round, and if no pass the information in the RoundEnded object.
These are the minimum changes possible to fix the issue, if anyone has any idea please express it.

Really annoying to test, you have to close the lid (make computer to go to sleep) during last minute of InputsRegPhase then wait 5 minutes then pray for the round to be successful.

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do it without adding business logic?

Naive ideas:

  • Change the message in the music box to be correct?
  • Just indicate failure in the UI?
  • Any other idea that is not touching the business but fixing this edge case UI problem?

@turbolay turbolay reopened this Jun 12, 2023
@turbolay
Copy link
Collaborator Author

I followed your advice @molnard and now throws instead of the complexity I had before.
I tested this code and it works great, the only issue is that in the logs there is:
Round (ded775054098d3fa9652626fc79ea774b16fe0dbc4ce0dbcd17909821edb6233): Broadcasted. Coinjoin TxId: (Not available)
But I don't think this is a problem.

@molnard
Copy link
Collaborator

molnard commented Jun 13, 2023

Sorry, I did something wrong here with git. I've just synced with your branch and this happened. I don't know how to fix it, can you take a look - it might be easier to remove my last commit as you are the owner of the branch.

@turbolay
Copy link
Collaborator Author

I removed your commit, I just resetted branch and forced push

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@molnard molnard merged commit 398ad11 into zkSNACKs:master Jun 13, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[VDG] MusicBox can display success even if wallet didn't have any input in the round
3 participants