aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r--src/qt/walletframe.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index 91ce420a33..663e86aa29 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -194,7 +194,7 @@ void WalletFrame::gotoVerifyMessageTab(QString addr)
void WalletFrame::gotoLoadPSBT(bool from_clipboard)
{
- std::string data;
+ std::vector<unsigned char> data;
if (from_clipboard) {
std::string raw = QApplication::clipboard()->text().toStdString();
@@ -214,12 +214,12 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
return;
}
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
- data = std::string(std::istreambuf_iterator<char>{in}, {});
+ data.assign(std::istream_iterator<unsigned char>{in}, {});
}
std::string error;
PartiallySignedTransaction psbtx;
- if (!DecodeRawPSBT(psbtx, data, error)) {
+ if (!DecodeRawPSBT(psbtx, MakeByteSpan(data), error)) {
Q_EMIT message(tr("Error"), tr("Unable to decode PSBT") + "\n" + QString::fromStdString(error), CClientUIInterface::MSG_ERROR);
return;
}