From 497f9875412634e1621510eeed3b3a513ffa4a0e Mon Sep 17 00:00:00 2001 From: napoly Date: Fri, 24 Nov 2023 23:50:33 +0100 Subject: [PATCH] fix csv export by avoiding null pointer with ZERO --- core/src/main/java/haveno/core/trade/Tradable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/haveno/core/trade/Tradable.java b/core/src/main/java/haveno/core/trade/Tradable.java index 596f4c6c93..7df3898047 100644 --- a/core/src/main/java/haveno/core/trade/Tradable.java +++ b/core/src/main/java/haveno/core/trade/Tradable.java @@ -57,7 +57,7 @@ public interface Tradable extends PersistablePayload { } default BigInteger getTotalTxFee() { - return asTradeModel().map(Trade::getTotalTxFee).get(); + return asTradeModel().map(Trade::getTotalTxFee).orElse(BigInteger.ZERO); } default Optional getOptionalTakerFee() {