-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Revert setting of null to deposit tx id #3958
Revert setting of null to deposit tx id #3958
Conversation
core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java
Outdated
Show resolved
Hide resolved
public boolean equals(Object obj) { | ||
if (this == obj) return true; | ||
if (obj == null || getClass() != obj.getClass()) return false; | ||
var wrapper = (WrapperTradeStatistics2) obj; |
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.
Don't you need a check that obj is actually a WrapperTradeStatistics2
here? Could cause an exception otherwise.
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 add it to make it safer if it is reused somewhere.
Atm using it like that should not cause this case to ever happen.
.map(WrapperTradeStatistics2::new)
.distinct()
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.
But will add a check to be sure
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.
ah wait - I've added it already 😉
if (obj == null || getClass() != obj.getClass()) return false;
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.
Oh, right, that's right, missed it.
Co-Authored-By: sqrrm <[email protected]>
Perhaps we should not leave this one as
|
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.
ACK
It's fine that depositTxId
stays @Nullable
since it's not set to null.
Tested with Alice and Bob on version 1.2.6, 1.2.5 respectively and Carol as a neutral spectator on both 1.2.5 and 1.2.6.
As we saw some unexpected behavior during testing we decided to move this change to v1.2.7
Additionally we'll remove even more information from the trade statistics objects and will deploy it together with changes
in the offer objects.