Improve naming of helper method

This commit is contained in:
Christoph Atteneder 2021-11-08 11:05:27 +01:00
parent 12cd88ce32
commit 2b90633263
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
4 changed files with 8 additions and 4 deletions

View file

@ -781,7 +781,9 @@ public abstract class MutableOfferDataModel extends OfferDataModel implements Bs
return offerUtil.isBsqForMakerFeeAvailable(amount.get());
}
boolean isBuyBsqOffer() {
boolean isAttemptToBuyBsq() {
// When you buy an asset you actually sell BTC.
// This is why an offer to buy BSQ is actually an offer to sell BTC for BSQ.
return !isBuyOffer() && getTradeCurrency().getCode().equals("BSQ");
}

View file

@ -1355,6 +1355,6 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
}
public boolean isShowBuyBsqHint() {
return !dataModel.isBsqForFeeAvailable() && !dataModel.isBuyBsqOffer();
return !dataModel.isBsqForFeeAvailable() && !dataModel.isAttemptToBuyBsq();
}
}

View file

@ -713,7 +713,9 @@ class TakeOfferDataModel extends OfferDataModel {
return offerUtil.isBsqForTakerFeeAvailable(amount.get());
}
public boolean isBuyBsqOffer() {
public boolean isAttemptToBuyBsq() {
// When you buy an asset you actually sell BTC.
// This is why an offer to buy BSQ is actually an offer to sell BTC for BSQ.
return !isBuyOffer() && getOffer().getCurrencyCode().equals("BSQ");
}
}

View file

@ -802,6 +802,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
}
public boolean isShowBuyBsqHint() {
return !dataModel.isBsqForFeeAvailable() && !dataModel.isBuyBsqOffer();
return !dataModel.isBsqForFeeAvailable() && !dataModel.isAttemptToBuyBsq();
}
}