Add conveniences isFiatOffer(offer), isAltcoinOffer(offer)

This commit is contained in:
ghubstan 2021-11-11 13:07:49 -03:00
parent 713b309f4a
commit 521495c41d
No known key found for this signature in database
GPG key ID: E35592D6800A861E

View file

@ -488,6 +488,14 @@ public class OfferUtil {
}
}
public static boolean isFiatOffer(Offer offer) {
return offer.getBaseCurrencyCode().equals("BTC") && !offer.isBsqSwapOffer();
}
public static boolean isAltcoinOffer(Offer offer) {
return offer.getCounterCurrencyCode().equals("BTC") && !offer.isBsqSwapOffer();
}
public static Optional<String> getInvalidMakerFeeTxErrorMessage(Offer offer, BtcWalletService btcWalletService) {
String offerFeePaymentTxId = offer.getOfferFeePaymentTxId();
if (offerFeePaymentTxId == null) {