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

Send funds - don't use all available funds by default #6316

Merged
merged 1 commit into from Aug 20, 2022
Merged
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 @@ -154,7 +154,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
private ChangeListener<Number> transactionFeeChangeListener;
private ToggleGroup feeToggleGroup, inputsToggleGroup;
private ToggleButton useCustomFee;
private final BooleanProperty useAllInputs = new SimpleBooleanProperty(true);
private final BooleanProperty useAllInputs = new SimpleBooleanProperty(false);
private boolean feeExcluded;
private int rowIndex = 0;
private final FeeService feeService;
Expand Down Expand Up @@ -364,7 +364,7 @@ protected void activate() {
feeToggleGroup.selectToggle(feeIncludedRadioButton);

if (inputsToggleGroup.getSelectedToggle() == null)
inputsToggleGroup.selectToggle(useAllInputsRadioButton);
inputsToggleGroup.selectToggle(useAllInputs.get() ? useAllInputsRadioButton : useCustomInputsRadioButton);
Copy link

Choose a reason for hiding this comment

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

Legacy nit: current Bisq coding standards dictate use of curly braces for all conditional statements even one liners.

Copy link
Author

Choose a reason for hiding this comment

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

I think it would be better to prepare all files fix in separated pull request. If you'd like I can do research regarding codacy configuration that would force developers to always use curly braces.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to prepare all files fix in separated pull request. If you'd like I can do research regarding codacy configuration that would force developers to always use curly braces.

I fear that would be quite a big PR to review 😬 - I'll check why Codacy didn't catch this in their checks.

Copy link
Contributor

Choose a reason for hiding this comment

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

AvoidInlineConditionals of Checkstyle doesn't seem to be triggered by this 🤔. I don't remember anymore exactly, but I thought the ? : conditionals are still ok to be used. No strong opinion from my side on this.

Copy link
Author

Choose a reason for hiding this comment

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

I fear that would be quite a big PR to review

That's true. I think we can omit this for now and merge this pull request as it is.


useCustomFee.setSelected(false);
transactionFeeInputTextField.setEditable(false);
Expand Down