Search in sources :

Example 6 with PaymentMethod

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;
}
Also used : PaymentMethod(bisq.core.payment.payload.PaymentMethod)

Example 7 with PaymentMethod

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;
}
Also used : PaymentMethod(bisq.core.payment.payload.PaymentMethod)

Aggregations

PaymentMethod (bisq.core.payment.payload.PaymentMethod)7 Tuple3 (bisq.common.util.Tuple3)3 Res (bisq.core.locale.Res)3 Offer (bisq.core.offer.Offer)3 PaymentAccount (bisq.core.payment.PaymentAccount)3 Popup (bisq.desktop.main.overlays.popups.Popup)3 BSFormatter (bisq.desktop.util.BSFormatter)3 Layout (bisq.desktop.util.Layout)3 Button (javafx.scene.control.Button)3 Label (javafx.scene.control.Label)3 ImageView (javafx.scene.image.ImageView)3 Inject (javax.inject.Inject)3 Coin (org.bitcoinj.core.Coin)3 Price (bisq.core.monetary.Price)2 OfferPayload (bisq.core.offer.OfferPayload)2 Navigation (bisq.desktop.Navigation)2 ActivatableViewAndModel (bisq.desktop.common.view.ActivatableViewAndModel)2 FxmlView (bisq.desktop.common.view.FxmlView)2 AutoTooltipButton (bisq.desktop.components.AutoTooltipButton)2 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)2