use of bisq.core.payment.WesternUnionAccount in project bisq-desktop by bisq-network.
the class FiatAccountsView method onSaveNewAccount.
// /////////////////////////////////////////////////////////////////////////////////////////
// UI actions
// /////////////////////////////////////////////////////////////////////////////////////////
private void onSaveNewAccount(PaymentAccount paymentAccount) {
Coin maxTradeLimitAsCoin = paymentAccount.getPaymentMethod().getMaxTradeLimitAsCoin("USD");
Coin maxTradeLimitSecondMonth = maxTradeLimitAsCoin.divide(2L);
Coin maxTradeLimitFirstMonth = maxTradeLimitAsCoin.divide(4L);
new Popup<>().information(Res.get("payment.limits.info", formatter.formatCoinWithCode(maxTradeLimitFirstMonth), formatter.formatCoinWithCode(maxTradeLimitSecondMonth), formatter.formatCoinWithCode(maxTradeLimitAsCoin))).width(700).closeButtonText(Res.get("shared.cancel")).actionButtonText(Res.get("shared.iUnderstand")).onAction(() -> {
final String currencyName = BisqEnvironment.getBaseCurrencyNetwork().getCurrencyName();
if (paymentAccount instanceof ClearXchangeAccount) {
new Popup<>().information(Res.get("payment.clearXchange.info", currencyName, currencyName)).width(900).closeButtonText(Res.get("shared.cancel")).actionButtonText(Res.get("shared.iConfirm")).onAction(() -> doSaveNewAccount(paymentAccount)).show();
} else if (paymentAccount instanceof WesternUnionAccount) {
new Popup<>().information(Res.get("payment.westernUnion.info")).width(700).closeButtonText(Res.get("shared.cancel")).actionButtonText(Res.get("shared.iUnderstand")).onAction(() -> doSaveNewAccount(paymentAccount)).show();
} else {
doSaveNewAccount(paymentAccount);
}
}).show();
}
Aggregations