GUI: Write PSBTs to file with binary mode

Github-Pull: #bitcoin-core/gui#188
Rebased-From: cc3971c9ff
pull/764/head
Andrew Chow 3 years ago committed by MarcoFalke
parent 36ecf5eb87
commit 3a12672419

@ -145,7 +145,7 @@ void PSBTOperationsDialog::saveTransaction() {
if (filename.isEmpty()) {
return;
}
std::ofstream out(filename.toLocal8Bit().data());
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
out << ssTx.str();
out.close();
showStatus(tr("PSBT saved to disk."), StatusLevel::INFO);

@ -427,7 +427,7 @@ void SendCoinsDialog::on_sendButton_clicked()
if (filename.isEmpty()) {
return;
}
std::ofstream out(filename.toLocal8Bit().data());
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
out << ssTx.str();
out.close();
Q_EMIT message(tr("PSBT saved"), "PSBT saved to disk", CClientUIInterface::MSG_INFORMATION);

Loading…
Cancel
Save