mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge bitcoin-core/gui#188: Write PSBTs to file with binary mode
cc3971c9ff538a924c1a76ca1352bcaeb24f579f GUI: Write PSBTs to file with binary mode (Andrew Chow) Pull request description: As noted in https://github.com/bitcoin/bitcoin/issues/20959, PSBT files should be opened in binary mode as on windows, all newlines are turned into CRLF which produces invalid PSBTs. Fixes https://github.com/bitcoin/bitcoin/issues/20959 ACKs for top commit: Talkless: utACK cc3971c9ff538a924c1a76ca1352bcaeb24f579f. Tree-SHA512: fee62b66da844017a44d7d6da6d2d2794b097a7dec33fb07711615df1e94dccc76f987ffcbb325ad1f8db2a2dd6eaf514b6cbd2453e7658b9f6c9fb5c4c41dab
This commit is contained in:
parent
9a02781412
commit
69431fd66a
@ -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);
|
||||
|
@ -518,7 +518,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…
Reference in New Issue
Block a user