mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Update currency related fields after switch of payment account
Fixes #5999
This commit is contained in:
parent
43fb6462cc
commit
00dc7998ef
1 changed files with 5 additions and 3 deletions
|
@ -558,16 +558,18 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
currencySelection.setVisible(paymentAccount.hasMultipleCurrencies());
|
||||
currencySelection.setManaged(paymentAccount.hasMultipleCurrencies());
|
||||
currencyTextFieldBox.setVisible(!paymentAccount.hasMultipleCurrencies());
|
||||
|
||||
model.onPaymentAccountSelected(paymentAccount);
|
||||
model.onCurrencySelected(model.getTradeCurrency());
|
||||
|
||||
if (paymentAccount.hasMultipleCurrencies()) {
|
||||
final List<TradeCurrency> tradeCurrencies = paymentAccount.getTradeCurrencies();
|
||||
currencyComboBox.setItems(FXCollections.observableArrayList(tradeCurrencies));
|
||||
model.onPaymentAccountSelected(paymentAccount);
|
||||
currencyComboBox.getSelectionModel().select(model.getTradeCurrency());
|
||||
} else {
|
||||
TradeCurrency singleTradeCurrency = paymentAccount.getSingleTradeCurrency();
|
||||
if (singleTradeCurrency != null)
|
||||
currencyTextField.setText(singleTradeCurrency.getNameAndCode());
|
||||
model.onPaymentAccountSelected(paymentAccount);
|
||||
model.onCurrencySelected(model.getDataModel().getTradeCurrency());
|
||||
}
|
||||
} else {
|
||||
currencySelection.setVisible(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue