use of bisq.core.payment.payload.PaymentMethod in project bisq-core by bisq-network.
the class ReceiptPredicates method isOfferRequireSameOrSpecificBank.
boolean isOfferRequireSameOrSpecificBank(Offer offer, PaymentAccount account) {
PaymentMethod paymentMethod = offer.getPaymentMethod();
boolean isSameOrSpecificBank = paymentMethod.equals(PaymentMethod.SAME_BANK) || paymentMethod.equals(PaymentMethod.SPECIFIC_BANKS);
return (account instanceof BankAccount) && isSameOrSpecificBank;
}
use of bisq.core.payment.payload.PaymentMethod in project bisq-core by bisq-network.
the class ReceiptPredicates method isEqualPaymentMethods.
boolean isEqualPaymentMethods(Offer offer, PaymentAccount account) {
// check if we have a matching payment method or if its a bank account payment method which is treated special
PaymentMethod accountPaymentMethod = account.getPaymentMethod();
PaymentMethod offerPaymentMethod = offer.getPaymentMethod();
boolean arePaymentMethodsEqual = accountPaymentMethod.equals(offerPaymentMethod);
if (log.isWarnEnabled()) {
String accountPaymentMethodId = accountPaymentMethod.getId();
String offerPaymentMethodId = offerPaymentMethod.getId();
if (!arePaymentMethodsEqual && accountPaymentMethodId.equals(offerPaymentMethodId)) {
log.warn(PaymentAccountUtil.getInfoForMismatchingPaymentMethodLimits(offer, account));
}
}
return arePaymentMethodsEqual;
}
Aggregations