|
8 | 8 | #include <qt/askpassphrasedialog.h> |
9 | 9 | #include <qt/clientmodel.h> |
10 | 10 | #include <qt/guiutil.h> |
11 | | -#include <qt/psbtoperationsdialog.h> |
12 | 11 | #include <qt/optionsmodel.h> |
13 | 12 | #include <qt/overviewpage.h> |
14 | 13 | #include <qt/platformstyle.h> |
|
21 | 20 |
|
22 | 21 | #include <interfaces/node.h> |
23 | 22 | #include <node/ui_interface.h> |
24 | | -#include <psbt.h> |
25 | 23 | #include <util/strencodings.h> |
26 | 24 |
|
27 | 25 | #include <QAction> |
28 | 26 | #include <QActionGroup> |
29 | | -#include <QApplication> |
30 | | -#include <QClipboard> |
31 | 27 | #include <QFileDialog> |
32 | 28 | #include <QHBoxLayout> |
33 | 29 | #include <QProgressDialog> |
@@ -205,44 +201,6 @@ void WalletView::gotoVerifyMessageTab(QString addr) |
205 | 201 | signVerifyMessageDialog->setAddress_VM(addr); |
206 | 202 | } |
207 | 203 |
|
208 | | -void WalletView::gotoLoadPSBT(bool from_clipboard) |
209 | | -{ |
210 | | - std::string data; |
211 | | - |
212 | | - if (from_clipboard) { |
213 | | - std::string raw = QApplication::clipboard()->text().toStdString(); |
214 | | - bool invalid; |
215 | | - data = DecodeBase64(raw, &invalid); |
216 | | - if (invalid) { |
217 | | - Q_EMIT message(tr("Error"), tr("Unable to decode PSBT from clipboard (invalid base64)"), CClientUIInterface::MSG_ERROR); |
218 | | - return; |
219 | | - } |
220 | | - } else { |
221 | | - QString filename = GUIUtil::getOpenFileName(this, |
222 | | - tr("Load Transaction Data"), QString(), |
223 | | - tr("Partially Signed Transaction (*.psbt)"), nullptr); |
224 | | - if (filename.isEmpty()) return; |
225 | | - if (GetFileSize(filename.toLocal8Bit().data(), MAX_FILE_SIZE_PSBT) == MAX_FILE_SIZE_PSBT) { |
226 | | - Q_EMIT message(tr("Error"), tr("PSBT file must be smaller than 100 MiB"), CClientUIInterface::MSG_ERROR); |
227 | | - return; |
228 | | - } |
229 | | - std::ifstream in(filename.toLocal8Bit().data(), std::ios::binary); |
230 | | - data = std::string(std::istreambuf_iterator<char>{in}, {}); |
231 | | - } |
232 | | - |
233 | | - std::string error; |
234 | | - PartiallySignedTransaction psbtx; |
235 | | - if (!DecodeRawPSBT(psbtx, data, error)) { |
236 | | - Q_EMIT message(tr("Error"), tr("Unable to decode PSBT") + "\n" + QString::fromStdString(error), CClientUIInterface::MSG_ERROR); |
237 | | - return; |
238 | | - } |
239 | | - |
240 | | - PSBTOperationsDialog* dlg = new PSBTOperationsDialog(this, walletModel, clientModel); |
241 | | - dlg->openWithPSBT(psbtx); |
242 | | - dlg->setAttribute(Qt::WA_DeleteOnClose); |
243 | | - dlg->exec(); |
244 | | -} |
245 | | - |
246 | 204 | bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient) |
247 | 205 | { |
248 | 206 | return sendCoinsPage->handlePaymentRequest(recipient); |
|
0 commit comments