Remove code for Venmo, Cashapp and OKPay

- We had an automate remove accounts for those payment methods for long
time, so we can assume that no traders have any of those accounts still
in their persisted user objects and it is safe to completely remove them.
Only part where we cannot remove it is the PB definitions (actually I
think we could remove those as well, but not 100% sure and it seems to
be more safe to mark those as deprecated and leave the entries).
This commit is contained in:
Manfred Karrer 2019-02-13 21:34:51 -05:00
parent 3fc9f45233
commit 11bc11fd24
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
25 changed files with 16 additions and 1153 deletions

View file

@ -710,14 +710,14 @@ message PaymentAccountPayload {
CryptoCurrencyAccountPayload crypto_currency_account_payload = 8;
FasterPaymentsAccountPayload faster_payments_account_payload = 9;
InteracETransferAccountPayload interac_e_transfer_account_payload = 10;
OKPayAccountPayload o_k_pay_account_payload = 11;
OKPayAccountPayload o_k_pay_account_payload = 11; // Deprecated, not used anymore
PerfectMoneyAccountPayload perfect_money_account_payload = 12;
SwishAccountPayload swish_account_payload = 13;
USPostalMoneyOrderAccountPayload u_s_postal_money_order_account_payload = 14;
UpholdAccountPayload uphold_account_payload = 16;
CashAppAccountPayload cash_app_account_payload = 17;
CashAppAccountPayload cash_app_account_payload = 17; // Deprecated, not used anymore
MoneyBeamAccountPayload money_beam_account_payload = 18;
VenmoAccountPayload venmo_account_payload = 19;
VenmoAccountPayload venmo_account_payload = 19; // Deprecated, not used anymore
PopmoneyAccountPayload popmoney_account_payload = 20;
RevolutAccountPayload revolut_account_payload = 21;
WeChatPayAccountPayload we_chat_pay_account_payload = 22;
@ -849,6 +849,7 @@ message InteracETransferAccountPayload {
string answer = 4;
}
// Deprecated, not used anymore
message OKPayAccountPayload {
string account_nr = 1;
}
@ -857,6 +858,7 @@ message UpholdAccountPayload {
string account_id = 1;
}
// Deprecated, not used anymore
message CashAppAccountPayload {
string cash_tag = 1;
}
@ -865,6 +867,7 @@ message MoneyBeamAccountPayload {
string account_id = 1;
}
// Deprecated, not used anymore
message VenmoAccountPayload {
string venmo_user_name = 1;
string holder_name = 2;

View file

@ -155,7 +155,6 @@ public class CurrencyUtil {
return currencies;
}
// At OKPay you can exchange internally those currencies
public static List<TradeCurrency> getAllAdvancedCashCurrencies() {
ArrayList<TradeCurrency> currencies = new ArrayList<>(Arrays.asList(
new FiatCurrency("USD"),
@ -170,34 +169,6 @@ public class CurrencyUtil {
return currencies;
}
public static List<TradeCurrency> getAllOKPayCurrencies() {
ArrayList<TradeCurrency> currencies = new ArrayList<>(Arrays.asList(
new FiatCurrency("EUR"),
new FiatCurrency("USD"),
new FiatCurrency("GBP"),
new FiatCurrency("CHF"),
new FiatCurrency("RUB"),
new FiatCurrency("PLN"),
new FiatCurrency("JPY"),
new FiatCurrency("CAD"),
new FiatCurrency("AUD"),
new FiatCurrency("CZK"),
new FiatCurrency("NOK"),
new FiatCurrency("SEK"),
new FiatCurrency("DKK"),
new FiatCurrency("HRK"),
new FiatCurrency("HUF"),
new FiatCurrency("NZD"),
new FiatCurrency("RON"),
new FiatCurrency("TRY"),
new FiatCurrency("ZAR"),
new FiatCurrency("HKD"),
new FiatCurrency("CNY")
));
currencies.sort(Comparator.comparing(TradeCurrency::getCode));
return currencies;
}
public static List<TradeCurrency> getAllMoneyGramCurrencies() {
ArrayList<TradeCurrency> currencies = new ArrayList<>(Arrays.asList(
new FiatCurrency("AED"),

View file

@ -1,48 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment;
import bisq.core.locale.FiatCurrency;
import bisq.core.payment.payload.CashAppAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PaymentMethod;
import lombok.EqualsAndHashCode;
// Removed due too high chargeback risk
@Deprecated
@EqualsAndHashCode(callSuper = true)
public final class CashAppAccount extends PaymentAccount {
public CashAppAccount() {
super(PaymentMethod.CASH_APP);
setSingleTradeCurrency(new FiatCurrency("USD"));
}
@Override
protected PaymentAccountPayload createPayload() {
return new CashAppAccountPayload(paymentMethod.getId(), id);
}
public void setCashTag(String cashTag) {
((CashAppAccountPayload) paymentAccountPayload).setCashTag(cashTag);
}
public String getCashTag() {
return ((CashAppAccountPayload) paymentAccountPayload).getCashTag();
}
}

View file

@ -1,47 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment;
import bisq.core.locale.CurrencyUtil;
import bisq.core.payment.payload.OKPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PaymentMethod;
import lombok.EqualsAndHashCode;
@Deprecated
@EqualsAndHashCode(callSuper = true)
public final class OKPayAccount extends PaymentAccount {
public OKPayAccount() {
super(PaymentMethod.OK_PAY);
tradeCurrencies.addAll(CurrencyUtil.getAllOKPayCurrencies());
}
@Override
protected PaymentAccountPayload createPayload() {
return new OKPayAccountPayload(paymentMethod.getId(), id);
}
public void setAccountNr(String accountNr) {
((OKPayAccountPayload) paymentAccountPayload).setAccountNr(accountNr);
}
public String getAccountNr() {
return ((OKPayAccountPayload) paymentAccountPayload).getAccountNr();
}
}

View file

@ -22,16 +22,10 @@ import bisq.core.payment.payload.PaymentMethod;
public class PaymentAccountFactory {
public static PaymentAccount getPaymentAccount(PaymentMethod paymentMethod) {
switch (paymentMethod.getId()) {
case PaymentMethod.OK_PAY_ID:
return new OKPayAccount();
case PaymentMethod.UPHOLD_ID:
return new UpholdAccount();
case PaymentMethod.CASH_APP_ID:
return new CashAppAccount();
case PaymentMethod.MONEY_BEAM_ID:
return new MoneyBeamAccount();
case PaymentMethod.VENMO_ID:
return new VenmoAccount();
case PaymentMethod.POPMONEY_ID:
return new PopmoneyAccount();
case PaymentMethod.REVOLUT_ID:

View file

@ -106,7 +106,7 @@ public class PaymentAccountUtil {
@Nullable
public static String getCountryCode(PaymentAccount paymentAccount) {
// That is optional and set to null if not supported (AltCoins, OKPay,...)
// That is optional and set to null if not supported (AltCoins,...)
if (paymentAccount instanceof CountryBasedPaymentAccount) {
Country country = (((CountryBasedPaymentAccount) paymentAccount)).getCountry();
return country != null ? country.code : null;
@ -115,7 +115,7 @@ public class PaymentAccountUtil {
}
// TODO no code duplication found in UI code (added for API)
// That is optional and set to null if not supported (AltCoins, OKPay,...)
// That is optional and set to null if not supported (AltCoins,...)
/* public static String getCountryCode(PaymentAccount paymentAccount) {
if (paymentAccount instanceof CountryBasedPaymentAccount) {
Country country = ((CountryBasedPaymentAccount) paymentAccount).getCountry();

View file

@ -1,56 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment;
import bisq.core.locale.FiatCurrency;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PaymentMethod;
import bisq.core.payment.payload.VenmoAccountPayload;
import lombok.EqualsAndHashCode;
// Removed due too high chargeback risk
@Deprecated
@EqualsAndHashCode(callSuper = true)
public final class VenmoAccount extends PaymentAccount {
public VenmoAccount() {
super(PaymentMethod.VENMO);
setSingleTradeCurrency(new FiatCurrency("USD"));
}
@Override
protected PaymentAccountPayload createPayload() {
return new VenmoAccountPayload(paymentMethod.getId(), id);
}
public void setVenmoUserName(String venmoUserName) {
((VenmoAccountPayload) paymentAccountPayload).setVenmoUserName(venmoUserName);
}
public String getVenmoUserName() {
return ((VenmoAccountPayload) paymentAccountPayload).getVenmoUserName();
}
public void setHolderName(String holderName) {
((VenmoAccountPayload) paymentAccountPayload).setHolderName(holderName);
}
public String getHolderName() {
return ((VenmoAccountPayload) paymentAccountPayload).getHolderName();
}
}

View file

@ -1,106 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message;
import org.springframework.util.CollectionUtils;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
// Removed due too high chargeback risk
@Deprecated
@EqualsAndHashCode(callSuper = true)
@ToString
@Setter
@Getter
@Slf4j
public final class CashAppAccountPayload extends PaymentAccountPayload {
private String cashTag = "";
public CashAppAccountPayload(String paymentMethod, String id) {
super(paymentMethod, id);
}
///////////////////////////////////////////////////////////////////////////////////////////
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////
private CashAppAccountPayload(String paymentMethod,
String id,
String cashTag,
long maxTradePeriod,
Map<String, String> excludeFromJsonDataMap) {
super(paymentMethod,
id,
maxTradePeriod,
excludeFromJsonDataMap);
this.cashTag = cashTag;
}
@Override
public Message toProtoMessage() {
return getPaymentAccountPayloadBuilder()
.setCashAppAccountPayload(PB.CashAppAccountPayload.newBuilder()
.setCashTag(cashTag))
.build();
}
public static CashAppAccountPayload fromProto(PB.PaymentAccountPayload proto) {
return new CashAppAccountPayload(proto.getPaymentMethodId(),
proto.getId(),
proto.getCashAppAccountPayload().getCashTag(),
proto.getMaxTradePeriod(),
CollectionUtils.isEmpty(proto.getExcludeFromJsonDataMap()) ? null : new HashMap<>(proto.getExcludeFromJsonDataMap()));
}
///////////////////////////////////////////////////////////////////////////////////////////
// API
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public String getPaymentDetails() {
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account") + " " + cashTag;
}
@Override
public String getPaymentDetailsForTradePopup() {
return getPaymentDetails();
}
@Override
public byte[] getAgeWitnessInputData() {
return super.getAgeWitnessInputData(cashTag.getBytes(Charset.forName("UTF-8")));
}
}

View file

@ -1,105 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message;
import org.springframework.util.CollectionUtils;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
@Deprecated
@EqualsAndHashCode(callSuper = true)
@ToString
@Setter
@Getter
@Slf4j
public final class OKPayAccountPayload extends PaymentAccountPayload {
private String accountNr = "";
public OKPayAccountPayload(String paymentMethod, String id) {
super(paymentMethod, id);
}
///////////////////////////////////////////////////////////////////////////////////////////
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////
private OKPayAccountPayload(String paymentMethod,
String id,
String accountNr,
long maxTradePeriod,
Map<String, String> excludeFromJsonDataMap) {
super(paymentMethod,
id,
maxTradePeriod,
excludeFromJsonDataMap);
this.accountNr = accountNr;
}
@Override
public Message toProtoMessage() {
return getPaymentAccountPayloadBuilder()
.setOKPayAccountPayload(PB.OKPayAccountPayload.newBuilder()
.setAccountNr(accountNr))
.build();
}
public static OKPayAccountPayload fromProto(PB.PaymentAccountPayload proto) {
return new OKPayAccountPayload(proto.getPaymentMethodId(),
proto.getId(),
proto.getOKPayAccountPayload().getAccountNr(),
proto.getMaxTradePeriod(),
CollectionUtils.isEmpty(proto.getExcludeFromJsonDataMap()) ? null : new HashMap<>(proto.getExcludeFromJsonDataMap()));
}
///////////////////////////////////////////////////////////////////////////////////////////
// API
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public String getPaymentDetails() {
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.no") + " " + accountNr;
}
@Override
public String getPaymentDetailsForTradePopup() {
return getPaymentDetails();
}
@Override
public byte[] getAgeWitnessInputData() {
return super.getAgeWitnessInputData(accountNr.getBytes(Charset.forName("UTF-8")));
}
}

View file

@ -61,14 +61,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable {
private static final Coin DEFAULT_TRADE_LIMIT_MID_RISK = Coin.parseCoin("0.25");
private static final Coin DEFAULT_TRADE_LIMIT_HIGH_RISK = Coin.parseCoin("0.125");
@Deprecated
public static final String OK_PAY_ID = "OK_PAY";
public static final String UPHOLD_ID = "UPHOLD";
@Deprecated
public static final String CASH_APP_ID = "CASH_APP"; // Removed due too high chargeback risk
public static final String MONEY_BEAM_ID = "MONEY_BEAM";
@Deprecated
public static final String VENMO_ID = "VENMO"; // Removed due too high chargeback risk
public static final String POPMONEY_ID = "POPMONEY";
public static final String REVOLUT_ID = "REVOLUT";
public static final String PERFECT_MONEY_ID = "PERFECT_MONEY";
@ -94,14 +88,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable {
public static final String PROMPT_PAY_ID = "PROMPT_PAY";
public static final String ADVANCED_CASH_ID = "ADVANCED_CASH";
@Deprecated
public static PaymentMethod OK_PAY;
public static PaymentMethod UPHOLD;
@Deprecated
public static PaymentMethod CASH_APP; // Removed due too high chargeback risk
public static PaymentMethod MONEY_BEAM;
@Deprecated
public static PaymentMethod VENMO; // Removed due too high chargeback risk
public static PaymentMethod POPMONEY;
public static PaymentMethod REVOLUT;
public static PaymentMethod PERFECT_MONEY;

View file

@ -1,112 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message;
import org.springframework.util.CollectionUtils;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
// Removed due too high chargeback risk
@Deprecated
@EqualsAndHashCode(callSuper = true)
@ToString
@Setter
@Getter
@Slf4j
public final class VenmoAccountPayload extends PaymentAccountPayload {
private String venmoUserName = "";
private String holderName = "";
public VenmoAccountPayload(String paymentMethod, String id) {
super(paymentMethod, id);
}
///////////////////////////////////////////////////////////////////////////////////////////
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////
private VenmoAccountPayload(String paymentMethod,
String id,
String venmoUserName,
String holderName,
long maxTradePeriod,
Map<String, String> excludeFromJsonDataMap) {
super(paymentMethod,
id,
maxTradePeriod,
excludeFromJsonDataMap);
this.venmoUserName = venmoUserName;
this.holderName = holderName;
}
@Override
public Message toProtoMessage() {
return getPaymentAccountPayloadBuilder()
.setVenmoAccountPayload(PB.VenmoAccountPayload.newBuilder()
.setVenmoUserName(venmoUserName)
.setHolderName(holderName))
.build();
}
public static VenmoAccountPayload fromProto(PB.PaymentAccountPayload proto) {
return new VenmoAccountPayload(proto.getPaymentMethodId(),
proto.getId(),
proto.getVenmoAccountPayload().getVenmoUserName(),
proto.getVenmoAccountPayload().getHolderName(),
proto.getMaxTradePeriod(),
CollectionUtils.isEmpty(proto.getExcludeFromJsonDataMap()) ? null : new HashMap<>(proto.getExcludeFromJsonDataMap()));
}
///////////////////////////////////////////////////////////////////////////////////////////
// API
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public String getPaymentDetails() {
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
Res.getWithCol("payment.venmo.venmoUserName") + " " + venmoUserName;
}
@Override
public String getPaymentDetailsForTradePopup() {
return getPaymentDetails();
}
@Override
public byte[] getAgeWitnessInputData() {
return super.getAgeWitnessInputData(venmoUserName.getBytes(Charset.forName("UTF-8")));
}
}

View file

@ -22,7 +22,6 @@ import bisq.core.dao.governance.proposal.storage.appendonly.ProposalPayload;
import bisq.core.payment.AccountAgeWitness;
import bisq.core.payment.payload.AdvancedCashAccountPayload;
import bisq.core.payment.payload.AliPayAccountPayload;
import bisq.core.payment.payload.CashAppAccountPayload;
import bisq.core.payment.payload.CashDepositAccountPayload;
import bisq.core.payment.payload.ChaseQuickPayAccountPayload;
import bisq.core.payment.payload.ClearXchangeAccountPayload;
@ -34,7 +33,6 @@ import bisq.core.payment.payload.InteracETransferAccountPayload;
import bisq.core.payment.payload.MoneyBeamAccountPayload;
import bisq.core.payment.payload.MoneyGramAccountPayload;
import bisq.core.payment.payload.NationalBankAccountPayload;
import bisq.core.payment.payload.OKPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PerfectMoneyAccountPayload;
import bisq.core.payment.payload.PopmoneyAccountPayload;
@ -47,7 +45,6 @@ import bisq.core.payment.payload.SpecificBanksAccountPayload;
import bisq.core.payment.payload.SwishAccountPayload;
import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload;
import bisq.core.payment.payload.UpholdAccountPayload;
import bisq.core.payment.payload.VenmoAccountPayload;
import bisq.core.payment.payload.WeChatPayAccountPayload;
import bisq.core.payment.payload.WesternUnionAccountPayload;
import bisq.core.trade.statistics.TradeStatistics2;
@ -113,18 +110,12 @@ public class CoreProtoResolver implements ProtoResolver {
return FasterPaymentsAccountPayload.fromProto(proto);
case INTERAC_E_TRANSFER_ACCOUNT_PAYLOAD:
return InteracETransferAccountPayload.fromProto(proto);
case O_K_PAY_ACCOUNT_PAYLOAD:
return OKPayAccountPayload.fromProto(proto);
case UPHOLD_ACCOUNT_PAYLOAD:
return UpholdAccountPayload.fromProto(proto);
case CASH_APP_ACCOUNT_PAYLOAD:
return CashAppAccountPayload.fromProto(proto);
case MONEY_BEAM_ACCOUNT_PAYLOAD:
return MoneyBeamAccountPayload.fromProto(proto);
case MONEY_GRAM_ACCOUNT_PAYLOAD:
return MoneyGramAccountPayload.fromProto(proto);
case VENMO_ACCOUNT_PAYLOAD:
return VenmoAccountPayload.fromProto(proto);
case POPMONEY_ACCOUNT_PAYLOAD:
return PopmoneyAccountPayload.fromProto(proto);
case REVOLUT_ACCOUNT_PAYLOAD:

View file

@ -2474,16 +2474,10 @@ F2F_SHORT=F2F
# Do not translate brand names
# suppress inspection "UnusedProperty"
OK_PAY=OKPay
# suppress inspection "UnusedProperty"
UPHOLD=Uphold
# suppress inspection "UnusedProperty"
CASH_APP=Cash App
# suppress inspection "UnusedProperty"
MONEY_BEAM=MoneyBeam (N26)
# suppress inspection "UnusedProperty"
VENMO=Venmo
# suppress inspection "UnusedProperty"
POPMONEY=Popmoney
# suppress inspection "UnusedProperty"
REVOLUT=Revolut
@ -2516,17 +2510,11 @@ PROMPT_PAY=PromptPay
# suppress inspection "UnusedProperty"
ADVANCED_CASH=Advanced Cash
# suppress inspection "UnusedProperty"
OK_PAY_SHORT=OKPay
# suppress inspection "UnusedProperty"
UPHOLD_SHORT=Uphold
# suppress inspection "UnusedProperty"
CASH_APP_SHORT=Cash App
# suppress inspection "UnusedProperty"
MONEY_BEAM_SHORT=MoneyBeam (N26)
# suppress inspection "UnusedProperty"
VENMO_SHORT=Venmo
# suppress inspection "UnusedProperty"
POPMONEY_SHORT=Popmoney
# suppress inspection "UnusedProperty"
REVOLUT_SHORT=Revolut

View file

@ -1,37 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment;
public class OKPayAccountPayloadTest {
/* @Test
public void toProtoBuf() throws Exception {
OKPayAccountPayload accountPayload = new OKPayAccountPayload("method", "id", 100);
accountPayload.setAccountNr("AccNr");
try {
String buffer = JsonFormat.printer().print(accountPayload.toProtoMessage().getOKPayAccountPayload());
JsonFormat.Parser parser = JsonFormat.parser();
PB.OKPayAccountPayload.Builder builder = PB.OKPayAccountPayload.newBuilder();
parser.merge(buffer, builder);
//assertEquals(accountPayload, new OKPayAccountPayload()ProtoBufferUtilities.getOkPayAccountPayload(builder.build()));
} catch (IOException e) {
e.printStackTrace();
fail();
}
}*/
}

View file

@ -1,42 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.payment;
import bisq.core.proto.CoreProtoResolver;
import org.junit.Ignore;
import static org.junit.Assert.assertEquals;
public class PaymentAccountTest {
@Ignore("TODO InvalidKeySpecException at bisq.common.crypto.Sig.getPublicKeyFromBytes(Sig.java:135)")
public void test() {
OKPayAccount account = new OKPayAccount();
String name = "name";
account.setAccountName(name);
String nr = "nr";
account.setAccountNr(nr);
OKPayAccount newVo = (OKPayAccount) PaymentAccount.fromProto(account.toProtoMessage(), new CoreProtoResolver());
assertEquals(name, newVo.getAccountName());
assertEquals(nr, newVo.getAccountNr());
}
}

View file

@ -1,101 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.CashAppValidator;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.payment.AccountAgeWitnessService;
import bisq.core.payment.CashAppAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.CashAppAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.util.BSFormatter;
import bisq.core.util.validation.InputValidator;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
// Removed due too high chargeback risk
@Deprecated
public class CashAppForm extends PaymentMethodForm {
private final CashAppAccount account;
private final CashAppValidator validator;
private InputTextField accountIdInputTextField;
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.cashApp.cashTag"), ((CashAppAccountPayload) paymentAccountPayload).getCashTag());
return gridRow;
}
public CashAppForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, CashAppValidator cashAppValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.account = (CashAppAccount) paymentAccount;
this.validator = cashAppValidator;
}
@Override
public void addFormForAddAccount() {
gridRowFrom = gridRow + 1;
accountIdInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.cashApp.cashTag"));
accountIdInputTextField.setValidator(validator);
accountIdInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
account.setCashTag(newValue);
updateFromInputs();
});
final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
addLimitations(false);
addAccountNameTextFieldWithAutoFillToggleButton();
}
@Override
protected void autoFillNameTextField() {
setAccountNameWithString(accountIdInputTextField.getText());
}
@Override
public void addFormForDisplayAccount() {
gridRowFrom = gridRow;
addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(account.getPaymentMethod().getId()));
TextField field = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("payment.cashApp.cashTag"), account.getCashTag()).second;
field.setMouseTransparent(false);
final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
addLimitations(true);
}
@Override
public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid()
&& validator.validate(account.getCashTag()).isValid
&& account.getTradeCurrencies().size() > 0);
}
}

View file

@ -1,142 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.OKPayValidator;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.payment.AccountAgeWitnessService;
import bisq.core.payment.OKPayAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.OKPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.util.BSFormatter;
import bisq.core.util.validation.InputValidator;
import org.apache.commons.lang3.StringUtils;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.GridPane;
import javafx.geometry.Insets;
import javafx.geometry.VPos;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
import static bisq.desktop.util.FormBuilder.addLabel;
import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
@Deprecated
public class OKPayForm extends PaymentMethodForm {
private static final Logger log = LoggerFactory.getLogger(OKPayForm.class);
private final OKPayAccount okPayAccount;
private final OKPayValidator okPayValidator;
private InputTextField accountNrInputTextField;
public static int addFormForBuyer(GridPane gridPane, int gridRow,
PaymentAccountPayload paymentAccountPayload) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.wallet"),
((OKPayAccountPayload) paymentAccountPayload).getAccountNr());
return gridRow;
}
public OKPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, OKPayValidator okPayValidator,
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.okPayAccount = (OKPayAccount) paymentAccount;
this.okPayValidator = okPayValidator;
}
@Override
public void addFormForAddAccount() {
gridRowFrom = gridRow + 1;
accountNrInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.wallet"));
accountNrInputTextField.setValidator(okPayValidator);
accountNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
okPayAccount.setAccountNr(newValue);
updateFromInputs();
});
addCurrenciesGrid(true);
addLimitations(false);
addAccountNameTextFieldWithAutoFillToggleButton();
}
private void addCurrenciesGrid(boolean isEditable) {
Label label = addLabel(gridPane, ++gridRow, Res.get("payment.supportedCurrencies"), 0);
GridPane.setValignment(label, VPos.TOP);
FlowPane flowPane = new FlowPane();
flowPane.setPadding(new Insets(10, 10, 10, 10));
flowPane.setVgap(10);
flowPane.setHgap(10);
if (isEditable)
flowPane.setId("flow-pane-checkboxes-bg");
else
flowPane.setId("flow-pane-checkboxes-non-editable-bg");
CurrencyUtil.getAllOKPayCurrencies().stream().forEach(e ->
fillUpFlowPaneWithCurrencies(isEditable, flowPane, e, okPayAccount));
GridPane.setRowIndex(flowPane, gridRow);
GridPane.setColumnIndex(flowPane, 1);
gridPane.getChildren().add(flowPane);
}
@Override
protected void autoFillNameTextField() {
if (useCustomAccountNameToggleButton != null && !useCustomAccountNameToggleButton.isSelected()) {
String accountNr = accountNrInputTextField.getText();
accountNr = StringUtils.abbreviate(accountNr, 9);
String method = Res.get(paymentAccount.getPaymentMethod().getId());
accountNameTextField.setText(method.concat(": ").concat(accountNr));
}
}
@Override
public void addFormForDisplayAccount() {
gridRowFrom = gridRow;
addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
okPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
Res.get(okPayAccount.getPaymentMethod().getId()));
TextField field = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get("payment.wallet"),
okPayAccount.getAccountNr()).second;
field.setMouseTransparent(false);
addLimitations(true);
addCurrenciesGrid(false);
}
@Override
public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid()
&& okPayValidator.validate(okPayAccount.getAccountNr()).isValid
&& okPayAccount.getTradeCurrencies().size() > 0);
}
}

View file

@ -1,122 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.VenmoValidator;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.payment.AccountAgeWitnessService;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.VenmoAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.VenmoAccountPayload;
import bisq.core.util.BSFormatter;
import bisq.core.util.validation.InputValidator;
import org.apache.commons.lang3.StringUtils;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextField;
import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
// Removed due too high chargeback risk
@Deprecated
public class VenmoForm extends PaymentMethodForm {
private final VenmoAccount account;
private final VenmoValidator validator;
private InputTextField accountIdInputTextField;
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
addTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
((VenmoAccountPayload) paymentAccountPayload).getHolderName());
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.venmo.venmoUserName"), ((VenmoAccountPayload) paymentAccountPayload).getVenmoUserName());
return gridRow;
}
public VenmoForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, VenmoValidator venmoValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.account = (VenmoAccount) paymentAccount;
this.validator = venmoValidator;
}
@Override
public void addFormForAddAccount() {
gridRowFrom = gridRow + 1;
InputTextField holderNameInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow,
Res.get("payment.account.owner"));
holderNameInputTextField.setValidator(inputValidator);
holderNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
account.setHolderName(newValue);
updateFromInputs();
});
accountIdInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.venmo.venmoUserName"));
accountIdInputTextField.setValidator(validator);
accountIdInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
account.setVenmoUserName(newValue);
updateFromInputs();
});
final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
addLimitations(false);
addAccountNameTextFieldWithAutoFillToggleButton();
}
@Override
protected void autoFillNameTextField() {
if (useCustomAccountNameToggleButton != null && !useCustomAccountNameToggleButton.isSelected()) {
String accountNr = accountIdInputTextField.getText();
accountNr = StringUtils.abbreviate(accountNr, 9);
String method = Res.get(paymentAccount.getPaymentMethod().getId());
accountNameTextField.setText(method.concat(": ").concat(accountNr));
}
}
@Override
public void addFormForDisplayAccount() {
gridRowFrom = gridRow;
addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(account.getPaymentMethod().getId()));
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
account.getHolderName());
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.venmo.venmoUserName"), account.getVenmoUserName()).second;
field.setMouseTransparent(false);
final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
addLimitations(true);
}
@Override
public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid()
&& inputValidator.validate(account.getHolderName()).isValid
&& validator.validate(account.getVenmoUserName()).isValid
&& account.getTradeCurrencies().size() > 0);
}
}

View file

@ -46,7 +46,6 @@ import javafx.collections.SetChangeListener;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
class FiatAccountsDataModel extends ActivatableDataModel {
@ -81,25 +80,6 @@ class FiatAccountsDataModel extends ActivatableDataModel {
protected void activate() {
user.getPaymentAccountsAsObservable().addListener(setChangeListener);
fillAndSortPaymentAccounts();
final Set<PaymentAccount> paymentAccounts = user.getPaymentAccounts();
if (paymentAccounts != null) {
// We try to clean up Venmo and CashApp accounts to be able to remove the code for those in
// later releases without breaking the persisted protobuffer data base files.
List<PaymentAccount> toRemove = new ArrayList<>();
paymentAccounts.stream()
.filter(paymentAccount -> paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.VENMO_ID) ||
paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_APP_ID) ||
paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.OK_PAY_ID))
.forEach(toRemove::add);
toRemove.forEach(paymentAccount -> {
if (onDeleteAccount(paymentAccount)) {
log.info("We deleted a blocked Venmo or CashApp account. paymentAccount name={}",
paymentAccount.getAccountName());
}
});
}
}
private void fillAndSortPaymentAccounts() {

View file

@ -21,7 +21,6 @@ import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.TitledGroupBg;
import bisq.desktop.components.paymentmethods.AdvancedCashForm;
import bisq.desktop.components.paymentmethods.AliPayForm;
import bisq.desktop.components.paymentmethods.CashAppForm;
import bisq.desktop.components.paymentmethods.CashDepositForm;
import bisq.desktop.components.paymentmethods.ChaseQuickPayForm;
import bisq.desktop.components.paymentmethods.ClearXchangeForm;
@ -32,7 +31,6 @@ import bisq.desktop.components.paymentmethods.InteracETransferForm;
import bisq.desktop.components.paymentmethods.MoneyBeamForm;
import bisq.desktop.components.paymentmethods.MoneyGramForm;
import bisq.desktop.components.paymentmethods.NationalBankForm;
import bisq.desktop.components.paymentmethods.OKPayForm;
import bisq.desktop.components.paymentmethods.PaymentMethodForm;
import bisq.desktop.components.paymentmethods.PerfectMoneyForm;
import bisq.desktop.components.paymentmethods.PopmoneyForm;
@ -45,7 +43,6 @@ import bisq.desktop.components.paymentmethods.SpecificBankForm;
import bisq.desktop.components.paymentmethods.SwishForm;
import bisq.desktop.components.paymentmethods.USPostalMoneyOrderForm;
import bisq.desktop.components.paymentmethods.UpholdForm;
import bisq.desktop.components.paymentmethods.VenmoForm;
import bisq.desktop.components.paymentmethods.WeChatPayForm;
import bisq.desktop.components.paymentmethods.WesternUnionForm;
import bisq.desktop.main.account.content.PaymentAccountsView;
@ -56,7 +53,6 @@ import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.AdvancedCashValidator;
import bisq.desktop.util.validation.AliPayValidator;
import bisq.desktop.util.validation.BICValidator;
import bisq.desktop.util.validation.CashAppValidator;
import bisq.desktop.util.validation.ChaseQuickPayValidator;
import bisq.desktop.util.validation.ClearXchangeValidator;
import bisq.desktop.util.validation.F2FValidator;
@ -64,7 +60,6 @@ import bisq.desktop.util.validation.HalCashValidator;
import bisq.desktop.util.validation.IBANValidator;
import bisq.desktop.util.validation.InteracETransferValidator;
import bisq.desktop.util.validation.MoneyBeamValidator;
import bisq.desktop.util.validation.OKPayValidator;
import bisq.desktop.util.validation.PerfectMoneyValidator;
import bisq.desktop.util.validation.PopmoneyValidator;
import bisq.desktop.util.validation.PromptPayValidator;
@ -72,7 +67,6 @@ import bisq.desktop.util.validation.RevolutValidator;
import bisq.desktop.util.validation.SwishValidator;
import bisq.desktop.util.validation.USPostalMoneyOrderValidator;
import bisq.desktop.util.validation.UpholdValidator;
import bisq.desktop.util.validation.VenmoValidator;
import bisq.desktop.util.validation.WeChatPayValidator;
import bisq.core.app.BisqEnvironment;
@ -125,11 +119,8 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
private final IBANValidator ibanValidator;
private final BICValidator bicValidator;
private final InputValidator inputValidator;
private final OKPayValidator okPayValidator;
private final UpholdValidator upholdValidator;
private final CashAppValidator cashAppValidator;
private final MoneyBeamValidator moneyBeamValidator;
private final VenmoValidator venmoValidator;
private final PopmoneyValidator popmoneyValidator;
private final RevolutValidator revolutValidator;
private final AliPayValidator aliPayValidator;
@ -157,11 +148,8 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
IBANValidator ibanValidator,
BICValidator bicValidator,
InputValidator inputValidator,
OKPayValidator okPayValidator,
UpholdValidator upholdValidator,
CashAppValidator cashAppValidator,
MoneyBeamValidator moneyBeamValidator,
VenmoValidator venmoValidator,
PopmoneyValidator popmoneyValidator,
RevolutValidator revolutValidator,
AliPayValidator aliPayValidator,
@ -183,11 +171,8 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
this.ibanValidator = ibanValidator;
this.bicValidator = bicValidator;
this.inputValidator = inputValidator;
this.okPayValidator = okPayValidator;
this.upholdValidator = upholdValidator;
this.cashAppValidator = cashAppValidator;
this.moneyBeamValidator = moneyBeamValidator;
this.venmoValidator = venmoValidator;
this.popmoneyValidator = popmoneyValidator;
this.revolutValidator = revolutValidator;
this.aliPayValidator = aliPayValidator;
@ -413,16 +398,10 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
private PaymentMethodForm getPaymentMethodForm(PaymentMethod paymentMethod, PaymentAccount paymentAccount) {
switch (paymentMethod.getId()) {
case PaymentMethod.OK_PAY_ID:
return new OKPayForm(paymentAccount, accountAgeWitnessService, okPayValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.UPHOLD_ID:
return new UpholdForm(paymentAccount, accountAgeWitnessService, upholdValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.CASH_APP_ID:
return new CashAppForm(paymentAccount, accountAgeWitnessService, cashAppValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.MONEY_BEAM_ID:
return new MoneyBeamForm(paymentAccount, accountAgeWitnessService, moneyBeamValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.VENMO_ID:
return new VenmoForm(paymentAccount, accountAgeWitnessService, venmoValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.POPMONEY_ID:
return new PopmoneyForm(paymentAccount, accountAgeWitnessService, popmoneyValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.REVOLUT_ID:

View file

@ -22,7 +22,6 @@ import bisq.desktop.components.TextFieldWithCopyIcon;
import bisq.desktop.components.TitledGroupBg;
import bisq.desktop.components.paymentmethods.AdvancedCashForm;
import bisq.desktop.components.paymentmethods.AliPayForm;
import bisq.desktop.components.paymentmethods.CashAppForm;
import bisq.desktop.components.paymentmethods.CashDepositForm;
import bisq.desktop.components.paymentmethods.ChaseQuickPayForm;
import bisq.desktop.components.paymentmethods.ClearXchangeForm;
@ -34,7 +33,6 @@ import bisq.desktop.components.paymentmethods.InteracETransferForm;
import bisq.desktop.components.paymentmethods.MoneyBeamForm;
import bisq.desktop.components.paymentmethods.MoneyGramForm;
import bisq.desktop.components.paymentmethods.NationalBankForm;
import bisq.desktop.components.paymentmethods.OKPayForm;
import bisq.desktop.components.paymentmethods.PerfectMoneyForm;
import bisq.desktop.components.paymentmethods.PopmoneyForm;
import bisq.desktop.components.paymentmethods.PromptPayForm;
@ -45,7 +43,6 @@ import bisq.desktop.components.paymentmethods.SpecificBankForm;
import bisq.desktop.components.paymentmethods.SwishForm;
import bisq.desktop.components.paymentmethods.USPostalMoneyOrderForm;
import bisq.desktop.components.paymentmethods.UpholdForm;
import bisq.desktop.components.paymentmethods.VenmoForm;
import bisq.desktop.components.paymentmethods.WeChatPayForm;
import bisq.desktop.components.paymentmethods.WesternUnionForm;
import bisq.desktop.main.overlays.popups.Popup;
@ -216,21 +213,12 @@ public class BuyerStep2View extends TradeStepView {
Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE);
switch (paymentMethodId) {
case PaymentMethod.OK_PAY_ID:
gridRow = OKPayForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.UPHOLD_ID:
gridRow = UpholdForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.CASH_APP_ID:
gridRow = CashAppForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.MONEY_BEAM_ID:
gridRow = MoneyBeamForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.VENMO_ID:
gridRow = VenmoForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.POPMONEY_ID:
gridRow = PopmoneyForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;

View file

@ -1,32 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.util.validation;
import bisq.core.util.validation.InputValidator;
// Removed due too high chargeback risk
@Deprecated
public final class CashAppValidator extends InputValidator {
@Override
public ValidationResult validate(String input) {
// TODO
return super.validate(input);
}
}

View file

@ -1,38 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.util.validation;
import bisq.core.util.validation.InputValidator;
public final class OKPayValidator extends InputValidator {
///////////////////////////////////////////////////////////////////////////////////////////
// Public methods
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public ValidationResult validate(String input) {
// TODO
return super.validate(input);
}
///////////////////////////////////////////////////////////////////////////////////////////
// Private methods
///////////////////////////////////////////////////////////////////////////////////////////
}

View file

@ -1,31 +0,0 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.desktop.util.validation;
import bisq.core.util.validation.InputValidator;
// Removed due too high chargeback risk
@Deprecated
public final class VenmoValidator extends InputValidator {
@Override
public ValidationResult validate(String input) {
// TODO
return super.validate(input);
}
}

View file

@ -25,10 +25,10 @@ import bisq.core.locale.Res;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;
import bisq.core.offer.OpenOfferManager;
import bisq.core.payment.AliPayAccount;
import bisq.core.payment.CountryBasedPaymentAccount;
import bisq.core.payment.CryptoCurrencyAccount;
import bisq.core.payment.NationalBankAccount;
import bisq.core.payment.OKPayAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PaymentAccountUtil;
import bisq.core.payment.SameBankAccount;
@ -110,10 +110,10 @@ public class OfferBookViewModelTest {
// simple cases: same payment methods
// offer: okpay paymentAccount: okpay - same country, same currency
paymentAccounts = new ArrayList<>(Collections.singletonList(getOKPayAccount("EUR")));
// offer: alipay paymentAccount: alipay - same country, same currency
paymentAccounts = new ArrayList<>(Collections.singletonList(getAliPayAccount("CNY")));
assertTrue(PaymentAccountUtil.isAnyPaymentAccountValidForOffer(
getOKPayPaymentMethod("EUR"), paymentAccounts));
getAliPayPaymentMethod("EUR"), paymentAccounts));
// offer: ether paymentAccount: ether - same country, same currency
paymentAccounts = new ArrayList<>(Collections.singletonList(getCryptoAccount("ETH")));
@ -442,8 +442,8 @@ public class OfferBookViewModelTest {
}
private PaymentAccount getOKPayAccount(String currencyCode) {
PaymentAccount paymentAccount = new OKPayAccount();
private PaymentAccount getAliPayAccount(String currencyCode) {
PaymentAccount paymentAccount = new AliPayAccount();
paymentAccount.setSelectedTradeCurrency(new FiatCurrency(currencyCode));
return paymentAccount;
}
@ -498,9 +498,9 @@ public class OfferBookViewModelTest {
null);
}
private Offer getOKPayPaymentMethod(String currencyCode) {
private Offer getAliPayPaymentMethod(String currencyCode) {
return getOffer(currencyCode,
PaymentMethod.OK_PAY_ID,
PaymentMethod.ALI_PAY_ID,
null,
null,
null,