Skip to content

Commit

Permalink
GUI: Write PSBTs to file with binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
achow101 committed Jan 19, 2021
1 parent 43f3ada commit cc3971c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qt/psbtoperationsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,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);
Expand Down

0 comments on commit cc3971c

Please sign in to comment.