Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not disable the payment account selection in take offer screen #2315

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ private void onShowPayFundsScreen() {

model.onShowPayFundsScreen();

paymentAccountsComboBox.setDisable(true);

editOfferElements.forEach(node -> {
node.setMouseTransparent(true);
node.setFocusTraversable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,11 @@ private void onShowPayFundsScreen() {

model.onShowPayFundsScreen();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that this keep the combobox enabled in the DAO mode when at payment screen? Maybe it requires an if check ro the dao mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the DAO is activated there is the additional step where you select the trade fee currency (BTC or BSQ), so there is no need to be able to switch the payment account also in the show funds screen. Before the DAO, you switch directly to the Pay Funds screen if there is no range to choose from, so it wouldn't be possible to switch to another payment account. That's why I needed to add this check.

if (DevEnv.isDaoActivated()) {
            paymentAccountsComboBox.setMouseTransparent(true);
            paymentAccountsComboBox.setDisable(true);
            paymentAccountsComboBox.setFocusTraversable(false);
}

paymentAccountsComboBox.setMouseTransparent(true);
paymentAccountsComboBox.setDisable(true);
paymentAccountsComboBox.setFocusTraversable(false);
if (DevEnv.isDaoActivated()) {
paymentAccountsComboBox.setMouseTransparent(true);
paymentAccountsComboBox.setDisable(true);
paymentAccountsComboBox.setFocusTraversable(false);
}

amountTextField.setMouseTransparent(true);
amountTextField.setDisable(false);
Expand Down