mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 15:41:44 +02:00
Merge pull request #11209
e96e9e6 simplewallet: quote notes in transfer exports (Samy)
ACKs: jpk68, selsta
This commit is contained in:
@@ -8671,7 +8671,7 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
||||
<< std::endl;
|
||||
|
||||
uint64_t running_balance = 0;
|
||||
auto formatter = boost::format("%8.8llu,%9.9s,%8.8s,%25.25s,%20.20s,%20.20s,%64.64s,%16.16s,%14.14s,%106.106s,%20.20s,\"%s\",%s,%s");
|
||||
auto formatter = boost::format("%8.8llu,%9.9s,%8.8s,%25.25s,%20.20s,%20.20s,%64.64s,%16.16s,%14.14s,%106.106s,%20.20s,\"%s\",\"%s\",%s");
|
||||
|
||||
for (const auto& transfer : all_transfers)
|
||||
{
|
||||
@@ -8693,6 +8693,9 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
||||
key_string = get_tx_key_stream(tx_key, additional_tx_keys);
|
||||
}
|
||||
|
||||
std::string note = transfer.note;
|
||||
boost::replace_all(note, "\"", "\"\"");
|
||||
|
||||
file << formatter
|
||||
% transfer.block
|
||||
% transfer.direction
|
||||
@@ -8706,7 +8709,7 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
||||
% (transfer.outputs.size() ? transfer.outputs[0].first : "-")
|
||||
% (transfer.outputs.size() ? print_money(transfer.outputs[0].second) : "")
|
||||
% boost::algorithm::join(transfer.index | boost::adaptors::transformed([](uint32_t i) { return std::to_string(i); }), ", ")
|
||||
% transfer.note
|
||||
% note
|
||||
% key_string
|
||||
<< std::endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user