<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #5132.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="797396612" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/5132" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/5132/hovercard" href="https://github.com/bisq-network/bisq/issues/5132">#5132</a><br>
<span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #3437.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="510100532" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/3437" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/3437/hovercard" href="https://github.com/bisq-network/bisq/issues/3437">#3437</a></p>
<p>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.</p>
<ul>
<li>Fix NPE when sending trader chat</li>
<li>Show error message to user when trader chat message cannot be sent.</li>
</ul>
<hr>
<h3>Screenshot:</h3>
<p>Instead of NPE, this error message:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/47253594/107295926-046d9200-6a36-11eb-8547-0704adcdb950.png"><img src="https://user-images.githubusercontent.com/47253594/107295926-046d9200-6a36-11eb-8547-0704adcdb950.png" alt="image" style="max-width:100%;"></a></p>
<h3>Testing:</h3>
<p>"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 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="792123204" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/5102" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/5102/hovercard" href="https://github.com/bisq-network/bisq/issues/5102">#5102</a>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/5175'>https://github.com/bisq-network/bisq/pull/5175</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fix NPE when sending trader chat</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-c844ab4120b637f296d646a14034e3a1752ee9e85fecbc080c2c38a79d1c5393">core/src/main/java/bisq/core/support/SupportManager.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-9bece24e704bac82b799973d2f2dfe57aeaf367385838d3a6cab4a37da32a31f">core/src/main/java/bisq/core/support/SupportSession.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-89a908360107e1731ca480148e330a918f61accd9a3ad73be9b53c9c8a943f74">core/src/main/java/bisq/core/support/dispute/DisputeSession.java</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-11a94f8a3caef407752c77817f63754a2bea0d2304d48f982b61bdb3a13e5b87">core/src/main/java/bisq/core/support/traderchat/TradeChatSession.java</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-a6cc570e0f56a36136791beae8f497706216230467708be9343344cd953e5f08">core/src/main/resources/i18n/displayStrings.properties</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5175/files#diff-63cad11c070fee7154615affe7949f75b0b47e394dbafde0b441f79cdc64fe92">desktop/src/main/java/bisq/desktop/main/shared/ChatView.java</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/5175.patch'>https://github.com/bisq-network/bisq/pull/5175.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/5175.diff'>https://github.com/bisq-network/bisq/pull/5175.diff</a></li>
</ul>

<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/5175">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXE5MKLBD6QSI3RNG3S6B3G5ANCNFSM4XJ6WK2A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQHVYN3O6XZOGJVAV3S6B3G5A5CNFSM4XJ6WK2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L7NDGPQ.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/5175",
"url": "https://github.com/bisq-network/bisq/pull/5175",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>