[bisq-network/bisq] Fix NPE in trader chat (#5175)

jmacxx notifications at github.com
Tue Feb 9 00:59:42 CET 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](https://user-images.githubusercontent.com/47253594/107295926-046d9200-6a36-11eb-8547-0704adcdb950.png)


### 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.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5175

-- Commit Summary --

  * Fix NPE when sending trader chat

-- File Changes --

    M core/src/main/java/bisq/core/support/SupportManager.java (6)
    M core/src/main/java/bisq/core/support/SupportSession.java (2)
    M core/src/main/java/bisq/core/support/dispute/DisputeSession.java (9)
    M core/src/main/java/bisq/core/support/traderchat/TradeChatSession.java (11)
    M core/src/main/resources/i18n/displayStrings.properties (1)
    M desktop/src/main/java/bisq/desktop/main/shared/ChatView.java (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5175.patch
https://github.com/bisq-network/bisq/pull/5175.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5175
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210208/0dfd8dc5/attachment.htm>


More information about the bisq-github mailing list