qml: QETxDetails: defer to wallet.get_tx_info() for rbf/cpfp #8894
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this logic should be encapsulated in the wallet.
Looks like the extra guards were added in 84cb210
(except for
can_save_as_local
-- added in 9cb8dea)I don't really see a reason why this logic should be GUI-specific.
Also, note that it can make sense to allow bump_fee on a local tx, and so wallet.get_tx_info() allows it (and hence so does the qt gui). For example, if your tx falls out of the mempool, you might want to bump it. (though it could also make sense to allow dscancel in the same scenario but we don't allow that)
For cpfp, as long as there is no package relay, it does not make sense to allow it for a local tx.
I don't really understand the guard on can_save_as_local - maybe @accumulator can comment if he remembers why it was added.
(My direct motivation is simply that I sometimes manually test rbf/cpfp and it would be easier to only have to patch a single localised thing.)