mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
qt: Load PSBTs using istreambuf_iterator rather than istream_iterator
istream_iterator eats whitespace charactesr which causes parsing failures for PSBTs that contain the bytes corresponding to those characters.
This commit is contained in:
parent
cb32328d1b
commit
bb5ea1d9a9
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
|
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
|
||||||
data.assign(std::istream_iterator<unsigned char>{in}, {});
|
data.assign(std::istreambuf_iterator<char>{in}, {});
|
||||||
|
|
||||||
// Some psbt files may be base64 strings in the file rather than binary data
|
// Some psbt files may be base64 strings in the file rather than binary data
|
||||||
std::string b64_str{data.begin(), data.end()};
|
std::string b64_str{data.begin(), data.end()};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue