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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4699#discussion_r514609919">desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java</a>:</p>
<pre style='color:#555'>>      }
 
     public String getRemainingTradeDurationAsWords() {
-        return FormattingUtils.formatDurationAsWords(Math.max(0, getRemainingTradeDuration()));
+        return tradeUtil.getRemainingTradeDurationAsWords(dataModel.getTrade());
</pre>
<p>I think a check for non null Trade would be good here.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4699#discussion_r514614053">desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java</a>:</p>
<pre style='color:#555'>>      }
 
     public String getDateForOpenDispute() {
-        return DisplayUtils.formatDateTime(new Date(new Date().getTime() + getRemainingTradeDuration()));
+        return DisplayUtils.formatDateTime(tradeUtil.getDateForOpenDispute(dataModel.getTrade()));
</pre>
<p>Also no check for null Trade</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4699#discussion_r514617386">core/src/main/java/bisq/core/trade/TradeUtil.java</a>:</p>
<pre style='color:#555'>> +    public Date getDateForOpenDispute(Trade trade) {
+        return new Date(new Date().getTime() + getRemainingTradeDuration(trade));
+    }
+
+    public String getMarketDescription(Trade trade) {
+        if (trade == null)
+            return "";
+
+        checkNotNull(trade.getOffer());
+        checkNotNull(trade.getOffer().getCurrencyCode());
+        return getCurrencyPair(trade.getOffer().getCurrencyCode());
+    }
+
+    public String getPaymentMethodNameWithCountryCode(Trade trade) {
+        String paymentMethodDescription = "";
+        if (trade != null) {
</pre>
<p>Prefer to return early, ie</p>
<pre><code>if (trade == null)
    return;

Offer offer = checkNotNull(trade.getOffer());
checkNotNull(offer.getPaymentMethod());
return offer.getPaymentMethodNameWithCountryCode();
</code></pre>

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