use of bisq.core.payment.payload.USPostalMoneyOrderAccountPayload in project bisq-desktop by bisq-network.
the class SellerStep3View method showPopup.
@SuppressWarnings("PointlessBooleanExpression")
private void showPopup() {
PaymentAccountPayload paymentAccountPayload = model.dataModel.getSellersPaymentAccountPayload();
// noinspection UnusedAssignment
String key = "confirmPayment" + trade.getId();
String message = "";
String tradeVolumeWithCode = model.btcFormatter.formatVolumeWithCode(trade.getTradeVolume());
String currencyName = CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode());
String part1 = Res.get("portfolio.pending.step3_seller.part", currencyName);
String id = trade.getShortId();
if (paymentAccountPayload instanceof CryptoCurrencyAccountPayload) {
String address = ((CryptoCurrencyAccountPayload) paymentAccountPayload).getAddress();
// noinspection UnusedAssignment
message = Res.get("portfolio.pending.step3_seller.altcoin", part1, currencyName, address, tradeVolumeWithCode, currencyName);
} else {
if (paymentAccountPayload instanceof USPostalMoneyOrderAccountPayload)
message = Res.get("portfolio.pending.step3_seller.postal", part1, tradeVolumeWithCode, id);
else if (!(paymentAccountPayload instanceof WesternUnionAccountPayload))
message = Res.get("portfolio.pending.step3_seller.bank", currencyName, tradeVolumeWithCode, id);
String part = Res.get("portfolio.pending.step3_seller.openDispute");
if (paymentAccountPayload instanceof CashDepositAccountPayload)
message = message + Res.get("portfolio.pending.step3_seller.cash", part);
else if (paymentAccountPayload instanceof WesternUnionAccountPayload)
message = message + Res.get("portfolio.pending.step3_seller.westernUnion", part);
Optional<String> optionalHolderName = getOptionalHolderName();
if (optionalHolderName.isPresent()) {
// noinspection UnusedAssignment
message = message + Res.get("portfolio.pending.step3_seller.bankCheck", optionalHolderName.get(), part);
}
}
// noinspection ConstantConditions
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
DontShowAgainLookup.dontShowAgain(key, true);
new Popup<>().headLine(Res.get("popup.attention.forTradeWithId", id)).attention(message).show();
}
}
use of bisq.core.payment.payload.USPostalMoneyOrderAccountPayload in project bisq-desktop by bisq-network.
the class BuyerStep2View method showPopup.
@SuppressWarnings("PointlessBooleanExpression")
private void showPopup() {
PaymentAccountPayload paymentAccountPayload = model.dataModel.getSellersPaymentAccountPayload();
if (paymentAccountPayload != null) {
String paymentDetailsForTradePopup = paymentAccountPayload.getPaymentDetailsForTradePopup();
String message = Res.get("portfolio.pending.step2.confReached");
String copyPaste = Res.get("portfolio.pending.step2_buyer.copyPaste");
String refTextWarn = Res.get("portfolio.pending.step2_buyer.refTextWarn");
String accountDetails = Res.get("portfolio.pending.step2_buyer.accountDetails");
String tradeId = Res.get("portfolio.pending.step2_buyer.tradeId");
String assign = Res.get("portfolio.pending.step2_buyer.assign");
String fees = Res.get("portfolio.pending.step2_buyer.fees");
String id = trade.getShortId();
String paddedId = " " + id + " ";
String amount = model.btcFormatter.formatVolumeWithCode(trade.getTradeVolume());
if (paymentAccountPayload instanceof CryptoCurrencyAccountPayload) {
// noinspection UnusedAssignment
message += Res.get("portfolio.pending.step2_buyer.altcoin", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()), amount) + accountDetails + paymentDetailsForTradePopup + ".\n\n" + copyPaste;
} else if (paymentAccountPayload instanceof CashDepositAccountPayload) {
// noinspection UnusedAssignment
message += Res.get("portfolio.pending.step2_buyer.cash", amount) + accountDetails + paymentDetailsForTradePopup + ".\n" + copyPaste + "\n\n" + tradeId + paddedId + assign + refTextWarn + "\n\n" + fees + "\n\n" + Res.get("portfolio.pending.step2_buyer.cash.extra");
} else if (paymentAccountPayload instanceof WesternUnionAccountPayload) {
final String email = ((WesternUnionAccountPayload) paymentAccountPayload).getEmail();
final String extra = Res.get("portfolio.pending.step2_buyer.westernUnion.extra", email);
message += Res.get("portfolio.pending.step2_buyer.westernUnion", amount) + accountDetails + paymentDetailsForTradePopup + ".\n" + copyPaste + "\n\n" + extra;
} else if (paymentAccountPayload instanceof USPostalMoneyOrderAccountPayload) {
// noinspection UnusedAssignment
message += Res.get("portfolio.pending.step2_buyer.postal", amount) + accountDetails + paymentDetailsForTradePopup + ".\n" + copyPaste + "\n\n" + tradeId + paddedId + assign + refTextWarn;
} else {
// noinspection UnusedAssignment
message += Res.get("portfolio.pending.step2_buyer.bank", amount) + accountDetails + paymentDetailsForTradePopup + ".\n" + copyPaste + "\n\n" + tradeId + paddedId + assign + refTextWarn + "\n\n" + fees;
}
// noinspection ConstantConditions,UnusedAssignment
String key = "startPayment" + trade.getId();
// noinspection ConstantConditions,ConstantConditions
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
DontShowAgainLookup.dontShowAgain(key, true);
new Popup<>().headLine(Res.get("popup.attention.forTradeWithId", id)).attention(message).show();
}
}
}
Aggregations