Search in sources :

Example 1 with SepaAccountPayload

use of bisq.core.payment.payload.SepaAccountPayload in project bisq-desktop by bisq-network.

the class OfferBookViewModelTest method getSepaAccount.

private PaymentAccount getSepaAccount(String currencyCode, String countryCode, String bic, ArrayList<String> countryCodes) {
    CountryBasedPaymentAccount paymentAccount = new SepaAccount();
    paymentAccount.setSingleTradeCurrency(new FiatCurrency(currencyCode));
    paymentAccount.setCountry(new Country(countryCode, null, null));
    ((SepaAccountPayload) paymentAccount.getPaymentAccountPayload()).setBic(bic);
    countryCodes.forEach(((SepaAccountPayload) paymentAccount.getPaymentAccountPayload())::addAcceptedCountry);
    return paymentAccount;
}
Also used : SepaAccount(bisq.core.payment.SepaAccount) CountryBasedPaymentAccount(bisq.core.payment.CountryBasedPaymentAccount) SepaAccountPayload(bisq.core.payment.payload.SepaAccountPayload) Country(bisq.core.locale.Country) FiatCurrency(bisq.core.locale.FiatCurrency)

Example 2 with SepaAccountPayload

use of bisq.core.payment.payload.SepaAccountPayload in project bisq-desktop by bisq-network.

the class SepaForm method addFormForBuyer.

public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
    SepaAccountPayload sepaAccountPayload = (SepaAccountPayload) paymentAccountPayload;
    final String title = Res.get("payment.account.owner");
    final String value = sepaAccountPayload.getHolderName();
    addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, title, value);
    FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("payment.bank.country"), CountryUtil.getNameAndCode(sepaAccountPayload.getCountryCode()));
    // IBAN, BIC will not be translated
    FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, "IBAN:", sepaAccountPayload.getIban());
    FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, "BIC:", sepaAccountPayload.getBic());
    return gridRow;
}
Also used : SepaAccountPayload(bisq.core.payment.payload.SepaAccountPayload)

Aggregations

SepaAccountPayload (bisq.core.payment.payload.SepaAccountPayload)2 Country (bisq.core.locale.Country)1 FiatCurrency (bisq.core.locale.FiatCurrency)1 CountryBasedPaymentAccount (bisq.core.payment.CountryBasedPaymentAccount)1 SepaAccount (bisq.core.payment.SepaAccount)1