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

Resolve issues found in reviewed PRs 4699, 4703, 4711 [, ...] #4731

Merged
merged 20 commits into from Nov 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/main/java/bisq/core/api/CoreTradesService.java
Expand Up @@ -21,6 +21,7 @@
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.offer.Offer;
import bisq.core.offer.takeoffer.TakeOfferModel;
import bisq.core.trade.Tradable;
import bisq.core.trade.Trade;
import bisq.core.trade.TradeManager;
import bisq.core.trade.TradeUtil;
Expand Down Expand Up @@ -199,7 +200,8 @@ private Optional<Trade> getOpenTrade(String tradeId) {
}

private Optional<Trade> getClosedTrade(String tradeId) {
return closedTradableManager.getTradableById(tradeId).map(value -> (Trade) value);
Optional<Tradable> tradable = closedTradableManager.getTradableById(tradeId);
return tradable.filter((t) -> t instanceof Trade).map(value -> (Trade) value);
}

private boolean isFollowingBuyerProtocol(Trade trade) {
Expand Down