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)
101101 }
102102
103103 // eventually disable the main receive button if private key operations are disabled
104- ui->receiveButton ->setEnabled (! model->privateKeysDisabled ());
104+ ui->receiveButton ->setEnabled (model->canGetAddresses ());
105105 }
106106}
107107
Original file line number Diff line number Diff line change @@ -571,6 +571,11 @@ bool WalletModel::privateKeysDisabled() const
571571 return m_wallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
572572}
573573
574+ bool WalletModel::canGetAddresses () const
575+ {
576+ return m_wallet->hdEnabled () || (!m_wallet->hdEnabled () && !m_wallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS));
577+ }
578+
574579QString WalletModel::getWalletName () const
575580{
576581 return QString::fromStdString (m_wallet->getWalletName ());
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ class WalletModel : public QObject
214214
215215 static bool isWalletEnabled ();
216216 bool privateKeysDisabled () const ;
217+ bool canGetAddresses () const ;
217218
218219 interfaces::Node& node () const { return m_node; }
219220 interfaces::Wallet& wallet () const { return *m_wallet; }
You can’t perform that action at this time.
0 commit comments