Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 500 Lines • ▼ Show 20 Lines | bool WalletModel::isWalletEnabled() { | ||||
return !gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET); | return !gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET); | ||||
} | } | ||||
bool WalletModel::privateKeysDisabled() const { | bool WalletModel::privateKeysDisabled() const { | ||||
return m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); | return m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); | ||||
} | } | ||||
bool WalletModel::canGetAddresses() const { | bool WalletModel::canGetAddresses() const { | ||||
// The wallet can provide a fresh address if: | return m_wallet->canGetAddresses(); | ||||
// * hdEnabled(): an HD seed is present; or | |||||
// * it is a legacy wallet, because: | |||||
// * !hdEnabled(): an HD seed is not present; and | |||||
// * !IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS): private keys | |||||
// have not been disabled (which results in hdEnabled() == true) | |||||
return m_wallet->hdEnabled() || | |||||
(!m_wallet->hdEnabled() && | |||||
!m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)); | |||||
} | } | ||||
QString WalletModel::getWalletName() const { | QString WalletModel::getWalletName() const { | ||||
return QString::fromStdString(m_wallet->getWalletName()); | return QString::fromStdString(m_wallet->getWalletName()); | ||||
} | } | ||||
QString WalletModel::getDisplayName() const { | QString WalletModel::getDisplayName() const { | ||||
const QString name = getWalletName(); | const QString name = getWalletName(); | ||||
Show All 10 Lines |