File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
101
101
}
102
102
103
103
// eventually disable the main receive button if private key operations are disabled
104
- ui->receiveButton ->setEnabled (! model->privateKeysDisabled ());
104
+ ui->receiveButton ->setEnabled (model->canGetAddresses ());
105
105
}
106
106
}
107
107
Original file line number Diff line number Diff line change @@ -571,6 +571,11 @@ bool WalletModel::privateKeysDisabled() const
571
571
return m_wallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
572
572
}
573
573
574
+ bool WalletModel::canGetAddresses () const
575
+ {
576
+ return m_wallet->hdEnabled () || (!m_wallet->hdEnabled () && !m_wallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS));
577
+ }
578
+
574
579
QString WalletModel::getWalletName () const
575
580
{
576
581
return QString::fromStdString (m_wallet->getWalletName ());
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ class WalletModel : public QObject
214
214
215
215
static bool isWalletEnabled ();
216
216
bool privateKeysDisabled () const ;
217
+ bool canGetAddresses () const ;
217
218
218
219
interfaces::Node& node () const { return m_node; }
219
220
interfaces::Wallet& wallet () const { return *m_wallet; }
You can’t perform that action at this time.
0 commit comments