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
[VDG] Privacy Progress N/A when balance is zero #12575
Conversation
@soosr Also, just a suggestion: maybe we can add a cool, marketing heavy tooltip when this appears such as: "Move your BTC into Wasabi and make them fully private now!" or something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the balance is zero and you receive some bitcoin you will see 100 %
for a split second.
I can repro, @ichthus1604 please take a look. |
@@ -233,7 +233,7 @@ public int GetPrivacyPercentage() | |||
{ | |||
var currentPrivacyScore = Coins.Sum(x => x.Amount.Satoshi * Math.Min(x.HdPubKey.AnonymitySet - 1, x.IsPrivate(AnonScoreTarget) ? AnonScoreTarget - 1 : AnonScoreTarget - 2)); | |||
var maxPrivacyScore = Coins.TotalAmount().Satoshi * (AnonScoreTarget - 1); | |||
int pcPrivate = maxPrivacyScore == 0M ? 100 : (int)(currentPrivacyScore * 100 / maxPrivacyScore); | |||
int pcPrivate = maxPrivacyScore == 0M ? 0 : (int)(currentPrivacyScore * 100 / maxPrivacyScore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could someone from the @zkSNACKs/code-team verify that this doesn't break anything in CJ code? @adamPetho @molnard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked and I think it's OK because we are in cases where we don't have any coins anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
Fixes #9543
I tried
-
as mentioned here but it looks really ugly: