File tree Expand file tree Collapse file tree 7 files changed +14
-2
lines changed
Expand file tree Collapse file tree 7 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1818#include < netbase.h>
1919#include < txdb.h> // for -dbcache defaults
2020#include < util/string.h>
21+ #include < util/system.h>
2122#include < validation.h> // For DEFAULT_SCRIPTCHECK_THREADS
2223#include < wallet/wallet.h> // For DEFAULT_SPEND_ZEROCONF_CHANGE
2324
@@ -640,6 +641,11 @@ bool OptionsModel::isRestartRequired() const
640641 return settings.value (" fRestartRequired" , false ).toBool ();
641642}
642643
644+ bool OptionsModel::hasSigner ()
645+ {
646+ return gArgs .GetArg (" -signer" , " " ) != " " ;
647+ }
648+
643649void OptionsModel::checkAndMigrate ()
644650{
645651 // Migration of default values
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ class OptionsModel : public QAbstractListModel
9898 bool getEnablePSBTControls () const { return m_enable_psbt_controls; }
9999 const QString& getOverriddenByCommandLine () { return strOverriddenByCommandLine; }
100100
101+ /* * Whether -signer was set or not */
102+ bool hasSigner ();
103+
101104 /* Explicit setters */
102105 void SetPruneTargetGB (int prune_target_gb);
103106
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ void SendCoinsDialog::setModel(WalletModel *_model)
203203 if (model->wallet ().hasExternalSigner ()) {
204204 // : "device" usually means a hardware wallet.
205205 ui->sendButton ->setText (tr (" Sign on device" ));
206- if (gArgs . GetArg ( " -signer " , " " ) != " " ) {
206+ if (model-> getOptionsModel ()-> hasSigner () ) {
207207 ui->sendButton ->setEnabled (true );
208208 ui->sendButton ->setToolTip (tr (" Connect your hardware wallet first." ));
209209 } else {
Original file line number Diff line number Diff line change 55#include < wallet/dump.h>
66
77#include < fs.h>
8+ #include < util/system.h>
89#include < util/translation.h>
910#include < wallet/wallet.h>
1011
Original file line number Diff line number Diff line change 66
77#include < common/url.h>
88#include < rpc/util.h>
9+ #include < util/system.h>
910#include < util/translation.h>
1011#include < wallet/context.h>
1112#include < wallet/wallet.h>
Original file line number Diff line number Diff line change 3434#include < util/moneystr.h>
3535#include < util/rbf.h>
3636#include < util/string.h>
37+ #include < util/system.h>
3738#include < util/translation.h>
3839#include < wallet/coincontrol.h>
3940#include < wallet/context.h>
Original file line number Diff line number Diff line change 1010#include < fs.h>
1111#include < interfaces/chain.h>
1212#include < interfaces/handler.h>
13+ #include < logging.h>
1314#include < outputtype.h>
1415#include < policy/feerate.h>
1516#include < psbt.h>
1920#include < util/result.h>
2021#include < util/strencodings.h>
2122#include < util/string.h>
22- #include < util/system.h>
2323#include < util/time.h>
2424#include < util/ui_change_type.h>
2525#include < validationinterface.h>
You can’t perform that action at this time.
0 commit comments