From 892db99dcb086a63ab0cc7f1f5e8fa93dd3d90e4 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 8 May 2024 17:13:33 +0700 Subject: [PATCH] Add check that price is not 0. Signed-off-by: HenrikJannsen --- .../dao/burningman/accounting/BurningManAccountingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/accounting/BurningManAccountingService.java b/core/src/main/java/bisq/core/dao/burningman/accounting/BurningManAccountingService.java index bf5138e91f..ac9ae5e5da 100644 --- a/core/src/main/java/bisq/core/dao/burningman/accounting/BurningManAccountingService.java +++ b/core/src/main/java/bisq/core/dao/burningman/accounting/BurningManAccountingService.java @@ -241,7 +241,7 @@ public class BurningManAccountingService implements DaoSetupService, DaoStateLis Date month = balanceEntry.getMonth(); long receivedBtc = balanceEntry.getAmount(); Price price = averageBsqPriceByMonth.get(month); - if (price == null) { + if (price == null || price.getValue() == 0) { return OptionalLong.empty(); } long volume = price.getVolumeByAmount(Coin.valueOf(receivedBtc)).getValue();