We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a834e commit 2c3ee4cCopy full SHA for 2c3ee4c
src/qt/walletframe.cpp
@@ -215,6 +215,14 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
215
}
216
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
217
data.assign(std::istream_iterator<unsigned char>{in}, {});
218
+
219
+ // Some psbt files may be base64 strings in the file rather than binary data
220
+ std::string b64_str{data.begin(), data.end()};
221
+ b64_str.erase(b64_str.find_last_not_of(" \t\n\r\f\v") + 1); // Trim trailing whitespace
222
+ auto b64_dec = DecodeBase64(b64_str);
223
+ if (b64_dec.has_value()) {
224
+ data = b64_dec.value();
225
+ }
226
227
228
std::string error;
0 commit comments