mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
[qt] WalletModel: Expose disablewallet
This commit is contained in:
parent
fa58edbffe
commit
6666ca6379
@ -77,6 +77,7 @@ const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
|
|||||||
|
|
||||||
BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
|
BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
|
enableWallet(false),
|
||||||
clientModel(0),
|
clientModel(0),
|
||||||
walletFrame(0),
|
walletFrame(0),
|
||||||
unitDisplayControl(0),
|
unitDisplayControl(0),
|
||||||
@ -122,10 +123,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
|
|||||||
|
|
||||||
QString windowTitle = tr(PACKAGE_NAME) + " - ";
|
QString windowTitle = tr(PACKAGE_NAME) + " - ";
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
/* if compiled with wallet support, -disablewallet can still disable the wallet */
|
enableWallet = WalletModel::isWalletEnabled();
|
||||||
enableWallet = !GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
|
|
||||||
#else
|
|
||||||
enableWallet = false;
|
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
if(enableWallet)
|
if(enableWallet)
|
||||||
{
|
{
|
||||||
|
@ -684,6 +684,11 @@ bool WalletModel::abandonTransaction(uint256 hash) const
|
|||||||
return wallet->AbandonTransaction(hash);
|
return wallet->AbandonTransaction(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WalletModel::isWalletEnabled()
|
||||||
|
{
|
||||||
|
return !GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
|
||||||
|
}
|
||||||
|
|
||||||
bool WalletModel::hdEnabled() const
|
bool WalletModel::hdEnabled() const
|
||||||
{
|
{
|
||||||
return wallet->IsHDEnabled();
|
return wallet->IsHDEnabled();
|
||||||
|
@ -203,6 +203,8 @@ public:
|
|||||||
bool transactionCanBeAbandoned(uint256 hash) const;
|
bool transactionCanBeAbandoned(uint256 hash) const;
|
||||||
bool abandonTransaction(uint256 hash) const;
|
bool abandonTransaction(uint256 hash) const;
|
||||||
|
|
||||||
|
static bool isWalletEnabled();
|
||||||
|
|
||||||
bool hdEnabled() const;
|
bool hdEnabled() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user