mirror of
https://github.com/wownero/wownero.git
synced 2026-11-28 11:54:06 +01:00
simplewallet: quote notes in transfer exports
This commit is contained in:
@@ -8673,7 +8673,7 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
uint64_t running_balance = 0;
|
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)
|
for (const auto& transfer : all_transfers)
|
||||||
{
|
{
|
||||||
@@ -8695,6 +8695,9 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
|||||||
key_string = get_tx_key_stream(tx_key, additional_tx_keys);
|
key_string = get_tx_key_stream(tx_key, additional_tx_keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string note = transfer.note;
|
||||||
|
boost::replace_all(note, "\"", "\"\"");
|
||||||
|
|
||||||
file << formatter
|
file << formatter
|
||||||
% transfer.block
|
% transfer.block
|
||||||
% transfer.direction
|
% transfer.direction
|
||||||
@@ -8708,7 +8711,7 @@ bool simple_wallet::export_transfers(const std::vector<std::string>& args_)
|
|||||||
% (transfer.outputs.size() ? transfer.outputs[0].first : "-")
|
% (transfer.outputs.size() ? transfer.outputs[0].first : "-")
|
||||||
% (transfer.outputs.size() ? print_money(transfer.outputs[0].second) : "")
|
% (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); }), ", ")
|
% boost::algorithm::join(transfer.index | boost::adaptors::transformed([](uint32_t i) { return std::to_string(i); }), ", ")
|
||||||
% transfer.note
|
% note
|
||||||
% key_string
|
% key_string
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user