diff options
author | Pieter Wuille <pieter@wuille.net> | 2022-04-04 13:52:06 -0400 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-04-27 14:12:55 +0200 |
commit | 78f3ac51b7d073d12da6a3b9b7d80d91e04ce3a7 (patch) | |
tree | 60a138e61a7281fbba6391da8d0d73bd0c1f9fee /src/qt | |
parent | a65931e3ce66d87b8f83d67ecdbb46f137e6a670 (diff) |
Make DecodeBase{32,64} return optional instead of taking bool*
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/walletframe.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(), |