Skip to content

Commit b6a7e51

Browse files
committed
wallet/gui: add silent_payments option to createwalletdialog
1 parent fe57ad2 commit b6a7e51

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

src/qt/createwalletdialog.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
8383
}
8484
});
8585

86+
connect(ui->silent_payments_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) {
87+
ui->silent_payments_wallet_checkbox->setEnabled(!checked);
88+
});
89+
8690
#ifndef ENABLE_EXTERNAL_SIGNER
8791
//: "External signing" means using devices such as hardware wallets.
8892
ui->external_signer_checkbox->setToolTip(tr("Compiled without external signing support (required for external signing)"));
@@ -138,6 +142,11 @@ bool CreateWalletDialog::isMakeBlankWalletChecked() const
138142
return ui->blank_wallet_checkbox->isChecked();
139143
}
140144

145+
bool CreateWalletDialog::isSilentPaymentsWalletChecked() const
146+
{
147+
return ui->silent_payments_wallet_checkbox->isChecked();
148+
}
149+
141150
bool CreateWalletDialog::isExternalSignerChecked() const
142151
{
143152
return ui->external_signer_checkbox->isChecked();

src/qt/createwalletdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class CreateWalletDialog : public QDialog
3535
bool isEncryptWalletChecked() const;
3636
bool isDisablePrivateKeysChecked() const;
3737
bool isMakeBlankWalletChecked() const;
38+
bool isSilentPaymentsWalletChecked() const;
3839
bool isExternalSignerChecked() const;
3940

4041
private:

src/qt/forms/createwalletdialog.ui

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@
153153
</property>
154154
</widget>
155155
</item>
156+
<item>
157+
<widget class="QCheckBox" name="silent_payments_wallet_checkbox">
158+
<property name="toolTip">
159+
<string>Make Silent Payments Wallet. Silent Payments wallet cannot use fast rescan.</string>
160+
</property>
161+
<property name="text">
162+
<string>Make Silent Payments Wallet</string>
163+
</property>
164+
</widget>
165+
</item>
156166
<item>
157167
<widget class="QCheckBox" name="external_signer_checkbox">
158168
<property name="toolTip">

src/qt/walletcontroller.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ void CreateWalletActivity::createWallet()
262262
if (m_create_wallet_dialog->isMakeBlankWalletChecked()) {
263263
flags |= WALLET_FLAG_BLANK_WALLET;
264264
}
265+
if (m_create_wallet_dialog->isSilentPaymentsWalletChecked()) {
266+
flags |= wallet::WALLET_FLAG_SILENT_PAYMENTS;
267+
}
265268
if (m_create_wallet_dialog->isExternalSignerChecked()) {
266269
flags |= WALLET_FLAG_EXTERNAL_SIGNER;
267270
}

0 commit comments

Comments
 (0)