Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Oct 30, 2018

Ref #13280
This PR removes the "Pay only the required fee..." checkbox from the custom transaction fee section in the "Send" tab. Instead, a minimum value will be enforced on the custom fee input box.

All comments from #13280 are addressed.

Before:
screenshot from 2018-10-30 16-42-18

After:
screenshot from 2018-10-30 16-40-37

cc: @promag @MarcoFalke @Sjors

This adds functions for specifing a min/max value for a
BitcoinAmountField. These options only affect user input, so it's still
possible to use setValue to set values outside of the min/max range. The
existing value will not be changed when calling these functions even if
it's out of range. The min/max range will be reinforced when the field
loses focus.
This also adds `SetAllowEmpty` function which specifies if the field is
allowed to be left empty by the user. If set to false the field will be
set to the minimum allowed value if it's empty when focus is lost.
The custom fee input box now has a minimum value equal to the minimum
required fee. Before a value below the minimum fee could be entered
which was confusing since the minimum fee would still be paid even
though a lower amount was entered.
@Sjors
Copy link
Member

Sjors commented Nov 2, 2018

tACK a16f44c on macOS 10.14.1

It doesn't make sense to cap the max fee rate at 21 000 000 BTC per kilobyte, but there's no harm either.

@jonasschnelli
Copy link
Contributor

Concept ACK

@bitcoin bitcoin deleted a comment from ismail120572 Nov 4, 2018
@maflcko
Copy link
Member

maflcko commented Nov 6, 2018

utACK a16f44c

Copy link
Contributor

@jonasschnelli jonasschnelli left a comment

Choose a reason for hiding this comment

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

utACK a16f44c

@laanwj
Copy link
Member

laanwj commented Nov 10, 2018

Concept ACK

@jonasschnelli
Copy link
Contributor

Tested ACK a16f44c

@jonasschnelli jonasschnelli merged commit a16f44c into bitcoin:master Nov 13, 2018
jonasschnelli added a commit that referenced this pull request Nov 13, 2018
a16f44c qt: Remove "Pay only required fee" checkbox (Hennadii Stepanov)
8711cc0 qt: Improve BitcoinAmountField class (Hennadii Stepanov)

Pull request description:

  Ref #13280
  This PR removes the "Pay only the required fee..." checkbox from the custom transaction fee section in the "Send" tab. Instead, a minimum value will be enforced on the custom fee input box.

  All comments from #13280 are addressed.

  Before:
  ![screenshot from 2018-10-30 16-42-18](https://user-images.githubusercontent.com/32963518/47726622-866d8e80-dc63-11e8-8670-3f97ff0fa5da.png)

  After:
  ![screenshot from 2018-10-30 16-40-37](https://user-images.githubusercontent.com/32963518/47726633-8f5e6000-dc63-11e8-82cf-5b9ff4aae91d.png)

  cc: @promag @MarcoFalke @Sjors

Tree-SHA512: 073577d38d8353b10e8f36fb52e3c6e81dd45d25d84df9b9e4f78f452ff0bdbff3e225bdd6122b5a03839ffdcc2a2a08175f81c2541cf2d12918536abbfa3fd1
@hebasto hebasto deleted the 20181030-remove-payonlyrequiredfee branch November 13, 2018 17:51
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 29, 2020
Summary:
> This adds functions for specifing a min/max value for a BitcoinAmountField. These options only affect user input, so it's still possible to use setValue to set values outside of the min/max range. The existing value will not be changed when calling these functions even if it's out of range. The min/max range will be reinforced when the field loses focus.
> This also adds `SetAllowEmpty` function which specifies if the field is allowed to be left empty by the user. If set to false the field will be set to the minimum allowed value if it's empty when focus is lost.

This is a backport of Core [[bitcoin/bitcoin#14608 | PR14608]] [1/2]
Commit: bitcoin/bitcoin@8711cc0

Depends on D8177.

Test Plan:
`ninja && src/qt/bitcoin-qt`

Verify that in the spend tab you cannot set amount or fees larger than 21 MBCH or lower than 0.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8176
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 29, 2020
Summary:
> The custom fee input box now has a minimum value equal to the minimum
> required fee. Before a value below the minimum fee could be entered
> which was confusing since the minimum fee would still be paid even
> though a lower amount was entered.

Backport of Core [[bitcoin/bitcoin#14608 | PR14608]] [2/2]
Commit bitcoin/bitcoin@a16f44c

Depends on D8176

Test Plan:
`ninja && src/qt/bitcoin-qt -regtest`

On the Spend page, custom fee section, verify that the "Pay only required fee" checkbox is no longer there and is replaced by a simple label.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8178
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants