<p></p>
<p><b>@KaiWitt</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5559#discussion_r648009923">desktop/src/main/java/bisq/desktop/components/PeerInfoIconTrading.java</a>:</p>
<pre style='color:#555'>> +        String accountAgeTooltip = isFiatCurrency ?
+                accountAge > -1 ? Res.get("peerInfoIcon.tooltip.age", DisplayUtils.formatAccountAge(accountAge)) :
+                        Res.get("peerInfoIcon.tooltip.unknownAge") :
+                "";
</pre>
<p>A dedicated method for this inner ternary would be nice. Makes it readable and the method could also be used in PeerInfoIconDispute.java line 40</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5559#discussion_r648012046">desktop/src/main/java/bisq/desktop/components/PeerInfoIconTrading.java</a>:</p>
<pre style='color:#555'>> +        Color ringColor = Color.rgb(0, 225, 0);
+        if (isFiatCurrency) {
+            switch (accountAgeWitnessService.getPeersAccountAgeCategory(hasChargebackRisk(trade, offer) ? signAge : accountAge)) {
+                case TWO_MONTHS_OR_MORE:
+                    ringColor = Color.rgb(0, 225, 0); // > 2 months green
+                    break;
+                case ONE_TO_TWO_MONTHS:
+                    ringColor = Color.rgb(0, 139, 205); // 1-2 months blue
+                    break;
+                case LESS_ONE_MONTH:
+                    ringColor = Color.rgb(255, 140, 0); //< 1 month orange
+                    break;
+                case UNVERIFIED:
+                default:
+                    ringColor = Color.rgb(255, 0, 0); // not signed, red
+                    break;
+            }
+        }
+        return ringColor;
+    }
</pre>
<p>I would prefer to immediately return <code>ringColor</code> if <code>!isFiatCurrency</code>, then you wouldn't have to nest the switch in the if clause. Lower level of nestedness is more pleasant to read. Might be a bit too opinionated, feel free to ignore/resolve</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5559#discussion_r648012534">desktop/src/main/java/bisq/desktop/components/PeerInfoIconTrading.java</a>:</p>
<pre style='color:#555'>> +    }
+
+    protected Color getRingColor(Offer offer, Trade trade, Long accountAge, Long signAge) {
+        // outer circle
+        // for altcoins we always display green
+        Color ringColor = Color.rgb(0, 225, 0);
+        if (isFiatCurrency) {
+            switch (accountAgeWitnessService.getPeersAccountAgeCategory(hasChargebackRisk(trade, offer) ? signAge : accountAge)) {
+                case TWO_MONTHS_OR_MORE:
+                    ringColor = Color.rgb(0, 225, 0); // > 2 months green
+                    break;
+                case ONE_TO_TWO_MONTHS:
+                    ringColor = Color.rgb(0, 139, 205); // 1-2 months blue
+                    break;
+                case LESS_ONE_MONTH:
+                    ringColor = Color.rgb(255, 140, 0); //< 1 month orange
</pre>

⬇️ Suggested change
<pre style="color: #555">-                    ringColor = Color.rgb(255, 140, 0); //< 1 month orange
+                    ringColor = Color.rgb(255, 140, 0); // < 1 month orange
</pre>


<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5559#discussion_r648015061">desktop/src/main/java/bisq/desktop/components/PeerInfoIconTrading.java</a>:</p>
<pre style='color:#555'>> +                accountAge > -1 ? Res.get("peerInfoIcon.tooltip.age", DisplayUtils.formatAccountAge(accountAge)) :
+                        Res.get("peerInfoIcon.tooltip.unknownAge") :
+                "";
+        tooltipText = hasTraded ?
+                Res.get("peerInfoIcon.tooltip.trade.traded", role, fullAddress, numTrades, accountAgeTooltip) :
+                Res.get("peerInfoIcon.tooltip.trade.notTraded", role, fullAddress, accountAgeTooltip);
+
+        createAvatar(getRingColor(offer, trade, accountAge, signAge));
+        addMouseListener(numTrades, privateNotificationManager, trade, offer, preferences, useDevPrivilegeKeys,
+                isFiatCurrency, accountAge, signAge, peersAccount.third, peersAccount.fourth, peersAccount.fifth);
+    }
+
+    protected Color getRingColor(Offer offer, Trade trade, Long accountAge, Long signAge) {
+        // outer circle
+        // for altcoins we always display green
+        Color ringColor = Color.rgb(0, 225, 0);
</pre>
<p>Would be nice to have all used colors somewhere as variables or as a Enum so that we wouldnt have to comment the color value all the time</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5559#pullrequestreview-679263003">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQH4Y6HTWJHTELVKJ3TR4GXTANCNFSM46KUCPVQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQ6FDSIVNXWFDO3H7TTR4GXTA5CNFSM46KUCPV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFB6LWGY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5559#pullrequestreview-679263003",
"url": "https://github.com/bisq-network/bisq/pull/5559#pullrequestreview-679263003",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>