Use isFiat method for checking if it is a fiat method

This commit is contained in:
Christoph Atteneder 2022-01-19 16:55:09 +01:00
parent cad973efd1
commit 638d638d25
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B

View file

@ -25,8 +25,6 @@ import bisq.core.locale.Res;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferDirection;
import bisq.core.offer.OfferRestrictions;
import bisq.core.payment.AssetAccount;
import bisq.core.payment.BsqSwapAccount;
import bisq.core.payment.ChargeBackRisk;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
@ -229,7 +227,7 @@ public class AccountAgeWitnessService {
private void republishAllFiatAccounts() {
if (user.getPaymentAccounts() != null)
user.getPaymentAccounts().stream()
.filter(account -> !(account instanceof AssetAccount) && !(account instanceof BsqSwapAccount))
.filter(account -> account.getPaymentMethod().isFiat())
.forEach(account -> {
AccountAgeWitness myWitness = getMyWitness(account.getPaymentAccountPayload());
// We only publish if the date of our witness is inside the date tolerance.