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

Fix NPE in trader chat #5175

Merged
merged 1 commit into from Feb 12, 2021
Merged

Fix NPE in trader chat #5175

merged 1 commit into from Feb 12, 2021

Conversation

ghost
Copy link

@ghost ghost commented Feb 8, 2021

Fixes #5132
Fixes #3437

When the trade contract is not set (due to connectivity issues, or erroneous conditions detected by the trade protocol), trader chat is not possible because the information about the peer is not available (it is stored in the contract). This was causing a null pointer exception, instead we should guard against use of the null contract, and show an appropriate error message when a chat message cannot be sent.

  • Fix NPE when sending trader chat
  • Show error message to user when trader chat message cannot be sent.

Screenshot:

Instead of NPE, this error message:

image

Testing:

"Trade contract not set" can be reproduced by taking an offer when there is a price discrepancy between Maker and Taker. An example is described in #5102.

Show error message to user when trader chat message cannot be sent.
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

Code changes are looking fine

@ripcurlx ripcurlx merged commit de57900 into bisq-network:master Feb 12, 2021
@ripcurlx ripcurlx added this to the v1.5.7 milestone Feb 18, 2021
@ghost ghost mentioned this pull request Feb 28, 2021
@ghost ghost deleted the fix_NPE_trader_chat branch May 29, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant