diff --git a/core/src/main/java/bisq/core/trade/Trade.java b/core/src/main/java/bisq/core/trade/Trade.java index a4aab2cdebb..6071e59d504 100644 --- a/core/src/main/java/bisq/core/trade/Trade.java +++ b/core/src/main/java/bisq/core/trade/Trade.java @@ -76,6 +76,8 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; +import java.time.temporal.ChronoUnit; + import java.util.Date; import java.util.HashSet; import java.util.Optional; @@ -424,6 +426,7 @@ public static protobuf.Trade.TradePeriodState toProtoMessage(Trade.TradePeriodSt private long lastRefreshRequestDate; @Getter private long refreshInterval; + private static final long MAX_REFRESH_INTERVAL = 4 * ChronoUnit.HOURS.getDuration().toMillis(); /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, initialization @@ -454,7 +457,7 @@ protected Trade(Offer offer, takeOfferDate = new Date().getTime(); processModel = new ProcessModel(); lastRefreshRequestDate = takeOfferDate; - refreshInterval = offer.getPaymentMethod().getMaxTradePeriod() / 5; + refreshInterval = Math.min(offer.getPaymentMethod().getMaxTradePeriod() / 5, MAX_REFRESH_INTERVAL); }