From 0c5ed8499686c936f20f0ccf535ea2737f226c44 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 21 May 2024 19:30:44 -0400 Subject: [PATCH] fix npe with offer details volume before prices loaded --- core/src/main/java/haveno/core/util/VolumeUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/haveno/core/util/VolumeUtil.java b/core/src/main/java/haveno/core/util/VolumeUtil.java index 2b25651b21..b74a70f226 100644 --- a/core/src/main/java/haveno/core/util/VolumeUtil.java +++ b/core/src/main/java/haveno/core/util/VolumeUtil.java @@ -168,11 +168,11 @@ public class VolumeUtil { } public static String formatVolume(Volume volume, boolean appendCode) { - return formatVolume(volume, getMonetaryFormat(volume.getCurrencyCode()), appendCode); + return formatVolume(volume, volume == null ? null : getMonetaryFormat(volume.getCurrencyCode()), appendCode); } public static String formatAverageVolumeWithCode(Volume volume) { - return formatVolume(volume, getMonetaryFormat(volume.getCurrencyCode()).minDecimals(2), true); + return formatVolume(volume, volume == null ? null : getMonetaryFormat(volume.getCurrencyCode()).minDecimals(2), true); } public static String formatVolumeLabel(String currencyCode) {