From 78f3ac51b7d073d12da6a3b9b7d80d91e04ce3a7 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 4 Apr 2022 13:52:06 -0400 Subject: Make DecodeBase{32,64} return optional instead of taking bool* --- src/qt/walletframe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qt') diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 663e86aa29..dc4e25a02b 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -198,12 +198,12 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard) if (from_clipboard) { std::string raw = QApplication::clipboard()->text().toStdString(); - bool invalid; - data = DecodeBase64(raw, &invalid); - if (invalid) { + auto result = DecodeBase64(raw); + if (!result) { Q_EMIT message(tr("Error"), tr("Unable to decode PSBT from clipboard (invalid base64)"), CClientUIInterface::MSG_ERROR); return; } + data = std::move(*result); } else { QString filename = GUIUtil::getOpenFileName(this, tr("Load Transaction Data"), QString(), -- cgit v1.2.3