Skip to content

Commit 3ad26d3

Browse files
Rock-N-TrollRock-N-Troll
Rock-N-Troll
authored and
Rock-N-Troll
committed
if nautomintdenom is set, do not allow UI update of nPreferredDenom
1 parent 9cf9e29 commit 3ad26d3

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

src/init.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,7 @@ bool AppInitMain()
17601760
if(gArgs.IsArgSet("-nautomintdenom")){
17611761
nPreferredDenom = gArgs.GetArg("-nautomintdenom", DEFAULT_AUTOMINT_DENOM);
17621762
if(nPreferredDenom != 10 && nPreferredDenom != 100 && nPreferredDenom != 1000 && nPreferredDenom != 10000){
1763+
LogPrintf("Invalid -nautomintdenom value set: %d. Defaulting to : %d\n", nPreferredDenom, DEFAULT_AUTOMINT_DENOM);
17631764
nPreferredDenom = DEFAULT_AUTOMINT_DENOM;
17641765
}
17651766
}

src/qt/veil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,8 @@ int main(int argc, char *argv[])
652652
// Automint denom
653653
// If nautomintdenom is set, use it
654654
// Else use saved UI settings
655-
QSettings* settings = getSettings();
656655
if(!gArgs.IsArgSet("-nautomintdenom")){
656+
QSettings* settings = getSettings();
657657
int tempPref = settings->value("nAutomintDenom").toInt();
658658
if(tempPref != nPreferredDenom && tempPref != 0){
659659
nPreferredDenom = tempPref;

src/qt/veil/forms/settingsminting.ui

+25-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,31 @@ font-size:14px;</string>
293293
</property>
294294
<property name="text">
295295
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Every 5 minutes the wallet will try to
296-
&lt;br&gt;mint new zerocoins of the seleted denom&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
296+
&lt;br&gt;mint new zerocoins of the selected denom&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
297+
</property>
298+
<property name="alignment">
299+
<set>Qt::AlignCenter</set>
300+
</property>
301+
<property name="wordWrap">
302+
<bool>false</bool>
303+
</property>
304+
</widget>
305+
</item>
306+
<item>
307+
<widget class="QLabel" name="labelAutomintConfig">
308+
<property name="minimumSize">
309+
<size>
310+
<width>100</width>
311+
<height>0</height>
312+
</size>
313+
</property>
314+
<property name="styleSheet">
315+
<string notr="true">color:#ff7575;
316+
font-size:14px;font-weight:bold;</string>
317+
</property>
318+
<property name="text">
319+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Automint control setting has been given to
320+
&lt;br&gt;your Veil configuration file&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
297321
</property>
298322
<property name="alignment">
299323
<set>Qt::AlignCenter</set>

src/qt/veil/settings/settingsminting.cpp

+16-6
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,24 @@ SettingsMinting::SettingsMinting(QWidget *parent, WalletView *mainWindow, Wallet
8181
connect(ui->btnEsc,SIGNAL(clicked()),this, SLOT(close()));
8282
connect(ui->btnSendMint,SIGNAL(clicked()),this, SLOT(btnMint()));
8383
connect(ui->editAmount, SIGNAL(returnPressed()), this, SLOT(btnMint()));
84-
connect(ui->radioButton10, SIGNAL(toggled(bool)), this, SLOT(onCheck10Clicked(bool)));
85-
connect(ui->radioButton100, SIGNAL(toggled(bool)), this, SLOT(onCheck100Clicked(bool)));
86-
connect(ui->radioButton1000, SIGNAL(toggled(bool)), this, SLOT(onCheck1000Clicked(bool)));
87-
connect(ui->radioButton100000, SIGNAL(toggled(bool)), this, SLOT(onCheck100000Clicked(bool)));
84+
if(gArgs.IsArgSet("-nautomintdenom")){
85+
ui->labelAutomintConfig->setVisible(true);
86+
ui->radioButton10->setEnabled(0);
87+
ui->radioButton100->setEnabled(0);
88+
ui->radioButton1000->setEnabled(0);
89+
ui->radioButton100000->setEnabled(0);
90+
ui->checkAutomintInstant->setEnabled(0);
91+
}
92+
else{
93+
ui->labelAutomintConfig->setVisible(false);
94+
connect(ui->radioButton10, SIGNAL(toggled(bool)), this, SLOT(onCheck10Clicked(bool)));
95+
connect(ui->radioButton100, SIGNAL(toggled(bool)), this, SLOT(onCheck100Clicked(bool)));
96+
connect(ui->radioButton1000, SIGNAL(toggled(bool)), this, SLOT(onCheck1000Clicked(bool)));
97+
connect(ui->radioButton100000, SIGNAL(toggled(bool)), this, SLOT(onCheck100000Clicked(bool)));
98+
connect(ui->checkAutomintInstant, SIGNAL(toggled(bool)), this, SLOT(onCheckFullMintClicked(bool)));
99+
}
88100
connect(ui->editAmount, SIGNAL(textChanged(const QString &)), this, SLOT(mintAmountChange(const QString &)));
89101

90-
connect(ui->checkAutomintInstant, SIGNAL(toggled(bool)), this, SLOT(onCheckFullMintClicked(bool)));
91-
92102
}
93103

94104
/**

0 commit comments

Comments
 (0)