Skip to content

Commit

Permalink
Use getCurrencyCode method rather than directly accessing member.
Browse files Browse the repository at this point in the history
The transient currencyCode member is null until the getter method
has been used, so we should no access the variable directly.

This fixes a problem with OfferBook filtering, which was checking
for isFiat(currencyCode); the variable was null and isFiat returned
the wrong answer.
  • Loading branch information
jmacxx authored and ripcurlx committed Aug 22, 2022
1 parent dd66520 commit 4e8e6eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/bisq/core/offer/Offer.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public Optional<OfferPayload> getOfferPayload() {
}

public boolean isFiatOffer() {
return CurrencyUtil.isFiatCurrency(currencyCode);
return CurrencyUtil.isFiatCurrency(getCurrencyCode());
}

public Optional<BsqSwapOfferPayload> getBsqSwapOfferPayload() {
Expand Down

0 comments on commit 4e8e6eb

Please sign in to comment.