mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 22:45:41 +01:00
Merge bitcoin-core/gui#441: Add Create Unsigned button to SendConfirmationDialog
742918c8efqt: hide Create Unsigned button behind an expert mode option (Andrew Chow)5c3b800acdqt: Add Create Unsigned button to SendConfirmationDialog (Andrew Chow) Pull request description: Instead of having different buttons or changing button behavior for making a PSBT, just have SendConfirmationDialog return whether the user wants a PSBT or a broadcasted transaction. Since this dialog is used by both the bumpFeeAction and the SendCoinsDialog, changes to both to support the different behavior is needed. They will check the return value of the SendConfirmationDialog for whether a PSBT needs to be created instead of checking whether private keys are disabled. Strings used in this dialog are being slightly modified to work with both private keys enabled and disabled wallets. Moved from https://github.com/bitcoin/bitcoin/pull/18789 ACKs for top commit: jarolrod: ACK742918cryanofsky: Code review ACK742918c8ef. Just suggested changes since last review. Looks great! hebasto: ACK742918c8ef, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: dd29f4364c7b4f15befe8fe63257b26187918786b005e0f8336183270b1a162680b93f6ced60f0285c6e607c084cc0d24950fc68a8f9c056521ede614041be66
This commit is contained in:
@@ -83,6 +83,11 @@ void OptionsModel::Init(bool resetSettings)
|
||||
settings.setValue("fCoinControlFeatures", false);
|
||||
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
|
||||
|
||||
if (!settings.contains("enable_psbt_controls")) {
|
||||
settings.setValue("enable_psbt_controls", false);
|
||||
}
|
||||
m_enable_psbt_controls = settings.value("enable_psbt_controls", false).toBool();
|
||||
|
||||
// These are shared with the core or have a command-line parameter
|
||||
// and we want command-line parameters to overwrite the GUI settings.
|
||||
//
|
||||
@@ -360,6 +365,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
return m_use_embedded_monospaced_font;
|
||||
case CoinControlFeatures:
|
||||
return fCoinControlFeatures;
|
||||
case EnablePSBTControls:
|
||||
return settings.value("enable_psbt_controls");
|
||||
case Prune:
|
||||
return settings.value("bPrune");
|
||||
case PruneSize:
|
||||
@@ -507,6 +514,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
|
||||
Q_EMIT coinControlFeaturesChanged(fCoinControlFeatures);
|
||||
break;
|
||||
case EnablePSBTControls:
|
||||
m_enable_psbt_controls = value.toBool();
|
||||
settings.setValue("enable_psbt_controls", m_enable_psbt_controls);
|
||||
break;
|
||||
case Prune:
|
||||
if (settings.value("bPrune") != value) {
|
||||
settings.setValue("bPrune", value);
|
||||
|
||||
Reference in New Issue
Block a user