From 508e548ff7fd73693c09ebae84b5afaa089bba54 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 11 Mar 2016 10:22:22 +0100 Subject: [PATCH] add persistable interface --- .../gui/main/offer/offerbook/OfferBookViewModel.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookViewModel.java index 134d804c80..a18c833b8e 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookViewModel.java @@ -346,14 +346,9 @@ class OfferBookViewModel extends ActivatableViewModel { if (paymentAccount instanceof CountryBasedPaymentAccount) { CountryBasedPaymentAccount countryBasedPaymentAccount = (CountryBasedPaymentAccount) paymentAccount; - checkNotNull(offer.getCountryCode(), "offer.getCountryCode() must not be null"); - checkNotNull(offer.getBankId(), "offer.getBankId() must not be null"); - checkNotNull(offer.getAcceptedCountryCodes(), "offer.getAcceptedCountryCodes() must not be null"); - - checkNotNull(countryBasedPaymentAccount.getCountry(), "paymentAccount.getCountry() must not be null"); - // check if we have a matching country - boolean matchesCountryCodes = offer.getAcceptedCountryCodes().contains(countryBasedPaymentAccount.getCountry().code); + boolean matchesCountryCodes = offer.getAcceptedCountryCodes() != null && countryBasedPaymentAccount.getCountry() != null && + offer.getAcceptedCountryCodes().contains(countryBasedPaymentAccount.getCountry().code); if (!matchesCountryCodes) return false;