diff --git a/core/src/main/java/bisq/core/api/CoreTradesService.java b/core/src/main/java/bisq/core/api/CoreTradesService.java index d5a664757c6..560353e0e44 100644 --- a/core/src/main/java/bisq/core/api/CoreTradesService.java +++ b/core/src/main/java/bisq/core/api/CoreTradesService.java @@ -82,7 +82,7 @@ void takeOffer(Offer offer, } void confirmPaymentStarted(String tradeId) { - var trade = getTradeWithId(tradeId); + var trade = getTrade(tradeId); if (isFollowingBuyerProtocol(trade)) { var tradeProtocol = tradeManager.getTradeProtocol(trade); ((BuyerProtocol) tradeProtocol).onPaymentStarted( @@ -98,7 +98,7 @@ void confirmPaymentStarted(String tradeId) { } void confirmPaymentReceived(String tradeId) { - var trade = getTradeWithId(tradeId); + var trade = getTrade(tradeId); if (isFollowingBuyerProtocol(trade)) { throw new IllegalStateException("you are the buyer, and not receiving payment"); } else { @@ -114,10 +114,6 @@ void confirmPaymentReceived(String tradeId) { } Trade getTrade(String tradeId) { - return getTradeWithId(tradeId); - } - - private Trade getTradeWithId(String tradeId) { return tradeManager.getTradeById(tradeId).orElseThrow(() -> new IllegalArgumentException(format("trade with id '%s' not found", tradeId))); }