Skip to content

Commit

Permalink
[QT/Daemon] Remove privacy page and disable automint
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynexus committed May 19, 2019
1 parent 9637872 commit 71d14e5
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Expand Up @@ -1915,7 +1915,7 @@ bool AppInit2()

fEnableZeromint = GetBoolArg("-enablezeromint", false);

nZeromintPercentage = GetArg("-zeromintpercentage", 10);
nZeromintPercentage = GetArg("-zeromintpercentage", 0);
if (nZeromintPercentage > 100) nZeromintPercentage = 100;
if (nZeromintPercentage < 1) nZeromintPercentage = 1;

Expand Down
43 changes: 21 additions & 22 deletions src/qt/bitcoingui.cpp
Expand Up @@ -88,7 +88,6 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent) : QMai
aboutAction(0),
receiveCoinsAction(0),
governanceAction(0),
privacyAction(0),
optionsAction(0),
toggleHideAction(0),
encryptWalletAction(0),
Expand Down Expand Up @@ -340,16 +339,16 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
#endif
tabGroup->addAction(historyAction);

privacyAction = new QAction(QIcon(":/icons/privacy"), tr("&Privacy"), this);
privacyAction->setStatusTip(tr("Privacy Actions for zDOGEC"));
privacyAction->setToolTip(privacyAction->statusTip());
privacyAction->setCheckable(true);
#ifdef Q_OS_MAC
privacyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_5));
#else
privacyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
#endif
tabGroup->addAction(privacyAction);
// privacyAction = new QAction(QIcon(":/icons/privacy"), tr("&Privacy"), this);
// privacyAction->setStatusTip(tr("Privacy Actions for zDOGEC"));
// privacyAction->setToolTip(privacyAction->statusTip());
// privacyAction->setCheckable(true);
// #ifdef Q_OS_MAC
// privacyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_5));
// #else
// privacyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
// #endif
// tabGroup->addAction(privacyAction);

#ifdef ENABLE_WALLET

Expand Down Expand Up @@ -388,8 +387,8 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(privacyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(privacyAction, SIGNAL(triggered()), this, SLOT(gotoPrivacyPage()));
// connect(privacyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
// connect(privacyAction, SIGNAL(triggered()), this, SLOT(gotoPrivacyPage()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
connect(governanceAction, SIGNAL(triggered()), this, SLOT(gotoGovernancePage()));
Expand Down Expand Up @@ -571,9 +570,9 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(privacyAction);
// toolbar->addAction(privacyAction);
toolbar->addAction(historyAction);
toolbar->addAction(privacyAction);
// toolbar->addAction(privacyAction);
QSettings settings;
if (settings.value("fShowMasternodesTab").toBool()) {
toolbar->addAction(masternodeAction);
Expand Down Expand Up @@ -677,7 +676,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
overviewAction->setEnabled(enabled);
sendCoinsAction->setEnabled(enabled);
receiveCoinsAction->setEnabled(enabled);
privacyAction->setEnabled(enabled);
// privacyAction->setEnabled(enabled);
historyAction->setEnabled(enabled);
QSettings settings;
if (settings.value("fShowMasternodesTab").toBool()) {
Expand Down Expand Up @@ -734,7 +733,7 @@ void BitcoinGUI::createTrayIconMenu()
trayIconMenu->addSeparator();
trayIconMenu->addAction(sendCoinsAction);
trayIconMenu->addAction(receiveCoinsAction);
trayIconMenu->addAction(privacyAction);
// trayIconMenu->addAction(privacyAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(signMessageAction);
trayIconMenu->addAction(verifyMessageAction);
Expand Down Expand Up @@ -837,11 +836,11 @@ void BitcoinGUI::gotoReceiveCoinsPage()
if (walletFrame) walletFrame->gotoReceiveCoinsPage();
}

void BitcoinGUI::gotoPrivacyPage()
{
privacyAction->setChecked(true);
if (walletFrame) walletFrame->gotoPrivacyPage();
}
// void BitcoinGUI::gotoPrivacyPage()
// {
// privacyAction->setChecked(true);
// if (walletFrame) walletFrame->gotoPrivacyPage();
// }

void BitcoinGUI::gotoSendCoinsPage(QString addr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.h
Expand Up @@ -219,7 +219,7 @@ private slots:
/** Switch to privacy page */
void gotoReceiveCoinsPage();
/** Switch to receive coins page */
void gotoPrivacyPage();
// void gotoPrivacyPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");

Expand Down
4 changes: 2 additions & 2 deletions src/qt/overviewpage.cpp
Expand Up @@ -243,8 +243,8 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed

// Adjust bubble-help according to AutoMint settings
QString automintHelp = tr("Current percentage of zdogec.\nIf AutoMint is enabled this percentage will settle around the configured AutoMint percentage (default = 10%).\n");
bool fEnableZeromint = GetBoolArg("-enablezeromint", true);
int nZeromintPercentage = GetArg("-zeromintpercentage", 10);
bool fEnableZeromint = GetBoolArg("-enablezeromint", false);
int nZeromintPercentage = GetArg("-zeromintpercentage", 0);
if (fEnableZeromint) {
automintHelp += tr("AutoMint is currently enabled and set to ") + QString::number(nZeromintPercentage) + "%.\n";
automintHelp += tr("To disable AutoMint add 'enablezeromint=0' in dogecash.conf.");
Expand Down
12 changes: 6 additions & 6 deletions src/qt/walletframe.cpp
Expand Up @@ -147,12 +147,12 @@ void WalletFrame::gotoReceiveCoinsPage()
i.value()->gotoReceiveCoinsPage();
}

void WalletFrame::gotoPrivacyPage()
{
QMap<QString, WalletView*>::const_iterator i;
for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i)
i.value()->gotoPrivacyPage();
}
// void WalletFrame::gotoPrivacyPage()
// {
// QMap<QString, WalletView*>::const_iterator i;
// for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i)
// i.value()->gotoPrivacyPage();
// }

void WalletFrame::gotoSendCoinsPage(QString addr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletframe.h
Expand Up @@ -63,7 +63,7 @@ public slots:
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to privacy page */
void gotoPrivacyPage();
// void gotoPrivacyPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Switch to explorer page */
Expand Down
20 changes: 10 additions & 10 deletions src/qt/walletview.cpp
Expand Up @@ -116,14 +116,14 @@ WalletView::WalletView(QWidget* parent) : QStackedWidget(parent),
vbox->addLayout(hbox_buttons);
transactionsPage->setLayout(vbox);

privacyPage = new PrivacyDialog();
// privacyPage = new PrivacyDialog();
governancePage = new GovernancePage();
receiveCoinsPage = new ReceiveCoinsDialog();
sendCoinsPage = new SendCoinsDialog();

addWidget(overviewPage);
addWidget(transactionsPage);
addWidget(privacyPage);
// addWidget(privacyPage);
addWidget(governancePage);
addWidget(receiveCoinsPage);
addWidget(sendCoinsPage);
Expand Down Expand Up @@ -199,7 +199,7 @@ void WalletView::setWalletModel(WalletModel* walletModel)
if (settings.value("fShowMasternodesTab").toBool()) {
masternodeListPage->setWalletModel(walletModel);
}
privacyPage->setModel(walletModel);
// privacyPage->setModel(walletModel);
receiveCoinsPage->setModel(walletModel);
sendCoinsPage->setModel(walletModel);
governancePage->setWalletModel(walletModel);
Expand Down Expand Up @@ -277,12 +277,12 @@ void WalletView::gotoReceiveCoinsPage()
setCurrentWidget(receiveCoinsPage);
}

void WalletView::gotoPrivacyPage()
{
setCurrentWidget(privacyPage);
// Refresh UI-elements in case coins were locked/unlocked in CoinControl
walletModel->emitBalanceChanged();
}
// void WalletView::gotoPrivacyPage()
// {
// setCurrentWidget(privacyPage);
// // Refresh UI-elements in case coins were locked/unlocked in CoinControl
// walletModel->emitBalanceChanged();
// }

void WalletView::gotoSendCoinsPage(QString addr)
{
Expand Down Expand Up @@ -346,7 +346,7 @@ bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
void WalletView::showOutOfSyncWarning(bool fShow)
{
overviewPage->showOutOfSyncWarning(fShow);
privacyPage->showOutOfSyncWarning(fShow);
// privacyPage->showOutOfSyncWarning(fShow);
}

void WalletView::updateEncryptionStatus()
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletview.h
Expand Up @@ -90,7 +90,7 @@ public slots:
/** Switch to explorer page */
void gotoBlockExplorerPage();
/** Switch to privacy page */
void gotoPrivacyPage();
// void gotoPrivacyPage();
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to send coins page */
Expand Down
9 changes: 5 additions & 4 deletions src/wallet/rpcwallet.cpp
Expand Up @@ -369,7 +369,7 @@ void SendMoneySC(const CScript scriptPubKeyIn, CAmount nValue, CWalletTx& wtxNew
throw JSONRPCError(RPC_WALLET_ERROR, strError);
}

// Parse dogecash address
// get ScriptPubKey
CScript scriptPubKey = scriptPubKeyIn;

// Create and send the transaction
Expand All @@ -388,6 +388,7 @@ UniValue burn(const UniValue& params, bool fHelp){
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"burn <amount> [hex string]\n"
"This command is used to Burn DOGEC Coins \n"
"<amount> is a real and is rounded to the nearest 0.00000001"
+ HelpRequiringPassphrase());
CScript scriptPubKey;
Expand All @@ -405,9 +406,9 @@ UniValue burn(const UniValue& params, bool fHelp){
}

// Amount
int64_t nAmount = params[0].get_int();
CTxDestination address1;
CWalletTx wtx;
int64_t nAmount = AmountFromValue(params[0]);
CTxDestination address1;
CWalletTx wtx;
SendMoneySC(scriptPubKey, nAmount, wtx,false);

EnsureWalletIsUnlocked();
Expand Down

0 comments on commit 71d14e5

Please sign in to comment.