mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fix ui forms for paypal, cash app, venmo
This commit is contained in:
parent
7abbe1c36f
commit
9b3d78bd4b
@ -132,15 +132,14 @@ public class PaymentAccountFactory {
|
|||||||
return new AchTransferAccount();
|
return new AchTransferAccount();
|
||||||
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
||||||
return new DomesticWireTransferAccount();
|
return new DomesticWireTransferAccount();
|
||||||
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
case PaymentMethod.OK_PAY_ID:
|
|
||||||
return new OKPayAccount();
|
|
||||||
case PaymentMethod.CASH_APP_ID:
|
case PaymentMethod.CASH_APP_ID:
|
||||||
return new CashAppAccount();
|
return new CashAppAccount();
|
||||||
case PaymentMethod.VENMO_ID:
|
case PaymentMethod.VENMO_ID:
|
||||||
return new VenmoAccount();
|
return new VenmoAccount();
|
||||||
|
|
||||||
|
// Cannot be deleted as it would break old trade history entries
|
||||||
|
case PaymentMethod.OK_PAY_ID:
|
||||||
|
return new OKPayAccount();
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("Not supported PaymentMethod: " + paymentMethod);
|
throw new RuntimeException("Not supported PaymentMethod: " + paymentMethod);
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,7 @@ public class CashAppForm extends PaymentMethodForm {
|
|||||||
private final EmailOrMobileNrOrCashtagValidator cashAppValidator;
|
private final EmailOrMobileNrOrCashtagValidator cashAppValidator;
|
||||||
|
|
||||||
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.cashtag"),
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.email.mobile.cashtag"), ((CashAppAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrCashtag());
|
||||||
((CashAppAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrCashtag());
|
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,7 @@ public class PayPalForm extends PaymentMethodForm {
|
|||||||
private final EmailOrMobileNrOrUsernameValidator paypalValidator;
|
private final EmailOrMobileNrOrUsernameValidator paypalValidator;
|
||||||
|
|
||||||
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.username"),
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.email.mobile.username"), ((PayPalAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
||||||
((PayPalAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,8 +41,7 @@ public class VenmoForm extends PaymentMethodForm {
|
|||||||
private final EmailOrMobileNrOrUsernameValidator venmoValidator;
|
private final EmailOrMobileNrOrUsernameValidator venmoValidator;
|
||||||
|
|
||||||
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.username"),
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.email.mobile.username"), ((VenmoAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
||||||
((VenmoAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,8 +51,10 @@ import haveno.desktop.components.paymentmethods.AssetsForm;
|
|||||||
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
|
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
|
||||||
import haveno.desktop.components.paymentmethods.BizumForm;
|
import haveno.desktop.components.paymentmethods.BizumForm;
|
||||||
import haveno.desktop.components.paymentmethods.CapitualForm;
|
import haveno.desktop.components.paymentmethods.CapitualForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.CashAppForm;
|
||||||
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
|
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
|
||||||
import haveno.desktop.components.paymentmethods.PayByMailForm;
|
import haveno.desktop.components.paymentmethods.PayByMailForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.PayPalForm;
|
||||||
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
||||||
import haveno.desktop.components.paymentmethods.CelPayForm;
|
import haveno.desktop.components.paymentmethods.CelPayForm;
|
||||||
import haveno.desktop.components.paymentmethods.ChaseQuickPayForm;
|
import haveno.desktop.components.paymentmethods.ChaseQuickPayForm;
|
||||||
@ -93,6 +95,7 @@ import haveno.desktop.components.paymentmethods.TransferwiseUsdForm;
|
|||||||
import haveno.desktop.components.paymentmethods.USPostalMoneyOrderForm;
|
import haveno.desktop.components.paymentmethods.USPostalMoneyOrderForm;
|
||||||
import haveno.desktop.components.paymentmethods.UpholdForm;
|
import haveno.desktop.components.paymentmethods.UpholdForm;
|
||||||
import haveno.desktop.components.paymentmethods.UpiForm;
|
import haveno.desktop.components.paymentmethods.UpiForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.VenmoForm;
|
||||||
import haveno.desktop.components.paymentmethods.VerseForm;
|
import haveno.desktop.components.paymentmethods.VerseForm;
|
||||||
import haveno.desktop.components.paymentmethods.WeChatPayForm;
|
import haveno.desktop.components.paymentmethods.WeChatPayForm;
|
||||||
import haveno.desktop.components.paymentmethods.WesternUnionForm;
|
import haveno.desktop.components.paymentmethods.WesternUnionForm;
|
||||||
@ -405,6 +408,15 @@ public class BuyerStep2View extends TradeStepView {
|
|||||||
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
||||||
gridRow = DomesticWireTransferForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
gridRow = DomesticWireTransferForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||||
break;
|
break;
|
||||||
|
case PaymentMethod.CASH_APP_ID:
|
||||||
|
gridRow = CashAppForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||||
|
break;
|
||||||
|
case PaymentMethod.PAYPAL_ID:
|
||||||
|
gridRow = PayPalForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||||
|
break;
|
||||||
|
case PaymentMethod.VENMO_ID:
|
||||||
|
gridRow = VenmoForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
log.error("Not supported PaymentMethod: " + paymentMethodId);
|
log.error("Not supported PaymentMethod: " + paymentMethodId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user