Add check for price==0

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2022-12-14 18:50:41 -05:00
parent 51c7e40be9
commit 2535f01eb1
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307

View File

@ -104,7 +104,7 @@ class BalanceEntryItem {
type = Optional.of(baseBalanceEntry.getType());
}
if (price.isEmpty() || receivedBtc.isEmpty()) {
if (price.isEmpty() || price.get().getValue() == 0 || receivedBtc.isEmpty()) {
receivedBtcAsBsq = Optional.empty();
} else {
long volume = price.get().getVolumeByAmount(Coin.valueOf(receivedBtc.get())).getValue();