<p></p>
<p><b>@sqrrm</b> approved this pull request.</p>

<p>utACK</p>
<p>A comment to tend to in a later PR</p>
<p>The usage of the wallet and the key might have to be refactored for safer key handling, but I think that should be done as a focused refactoring.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4711#discussion_r515520278">core/src/main/java/bisq/core/api/CoreTradesService.java</a>:</p>
<pre style='color:#555'>>      }
 
     String getTradeRole(String tradeId) {
         return tradeUtil.getRole(getTrade(tradeId));
     }
 
     Trade getTrade(String tradeId) {
-        return tradeManager.getTradeById(tradeId).orElseThrow(() ->
-                new IllegalArgumentException(format("trade with id '%s' not found", tradeId)));
+        return getOpenTrade(tradeId).orElseGet(() ->
+                getClosedTrade(tradeId).orElseThrow(() ->
+                        new IllegalArgumentException(format("trade with id '%s' not found", tradeId))
+                ));
+    }
+
+    private Optional<Trade> getOpenTrade(String tradeId) {
+        return tradeManager.getTradeById(tradeId);
+    }
+
+    private Optional<Trade> getClosedTrade(String tradeId) {
+        return closedTradableManager.getTradableById(tradeId).map(value -> (Trade) value);
</pre>
<p>There is no guarantee that the <code>Tradable</code> is a <code>Trade</code> here, probably good to add a check for <code>instanceof</code>.</p>

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