Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31

src/qt/sweepdialog.h

Before: /dev/null · After: src/qt/sweepdialog.h

File metadata
new file mode 100644
index 0000000000000000000000000000000000000000..2a2d7b929fc5e37a6b31e72c86edd2aadcb09440

Download original patch · Release notes

Diff rows 1–53 of 53. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/qt/sweepdialog.h ADDED
@@ -0,0 +1,53 @@
1
+ // Copyright (c) 2026 The Bitcoin Roots developers
2
+ // Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/MIT.
3
+
4
+ #ifndef BITCOIN_QT_SWEEPDIALOG_H
5
+ #define BITCOIN_QT_SWEEPDIALOG_H
6
+
7
+ #include <QDialog>
8
+ #include <support/allocators/secure.h>
9
+
10
+ #include <cstdint>
11
+
12
+ class QLabel;
13
+ class QLineEdit;
14
+ class QPushButton;
15
+ class WalletModel;
16
+
17
+ class SweepDialog : public QDialog
18
+ {
19
+ Q_OBJECT
20
+ public:
21
+ explicit SweepDialog(WalletModel* wallet_model, QWidget* parent = nullptr);
22
+ ~SweepDialog() override;
23
+ void reject() override;
24
+
25
+ private Q_SLOTS:
26
+ void preview();
27
+ void broadcast();
28
+ void invalidate();
29
+ void clearSensitive();
30
+ void handleSweepFinished(uint64_t generation, bool broadcast, bool success, const QString& error,
31
+ qint64 amount, qint64 fee, quint64 inputs, qint64 vsize, bool rbf, const QString& txid);
32
+
33
+ private:
34
+ friend struct SweepDialogTestAccess;
35
+ void clearPrivateKeyCache();
36
+ void setResult(const QString& text, bool can_broadcast);
37
+ void setBusy(bool busy);
38
+ WalletModel* m_wallet_model;
39
+ QLineEdit* m_private_key;
40
+ QLineEdit* m_destination;
41
+ QLabel* m_result;
42
+ QPushButton* m_preview;
43
+ QPushButton* m_broadcast;
44
+ bool m_busy{false};
45
+ bool m_preview_current{false};
46
+ //! Incremented for every user-visible invalidation. Async completions must
47
+ //! compare their captured generation before updating this dialog.
48
+ uint64_t m_request_generation{0};
49
+ SecureString m_private_key_cache;
50
+ QString m_preview_txid;
51
+ };
52
+
53
+ #endif // BITCOIN_QT_SWEEPDIALOG_H