HistoryExport: remove fiat column
What changed, and why it matters
This commit removes a feature that added a fiat (US dollar) value column to exported transaction history CSV files. The change deletes code that looked up historical exchange rates and multiplied them by transaction amounts. There is no indication in the commit that this was a security fix; it appears to be a feature removal, possibly due to unreliable price data, privacy concerns about linking transactions to exchange rates, or user preference. No vulnerability is evident from the diff itself.
No security action required. If maintaining this code, consider documenting the rationale for removing fiat columns for users who relied on the export format. If privacy was a concern, note that removing exchange-rate lookups reduces data shared in exports.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes the fiatAmount and fiatCurrency columns from HistoryExportDialog’s CSV export. It deletes the include of AppData.h, removes a call to appData()->txFiatHistory->get(…) to fetch a USD price for the transaction date, removes the calculation fiat_price = usd_price * tx.amountDouble(), and updates the CSV format string and header accordingly. The change is purely subtractive and does not introduce new logic, parsing, network calls, or file handling.
Changed components
src/dialog/HistoryExportDialog.cppInspect captured patch +3 / −10
### src/dialog/HistoryExportDialog.cpp
@@ -10,7 +10,6 @@
#include "WalletManager.h"
#include "libwalletqt/Wallet.h"
#include "TransactionHistory.h"
-#include "utils/AppData.h"
HistoryExportDialog::HistoryExportDialog(Wallet *wallet, QWidget *parent)
: WindowModalDialog(parent)
@@ -147,11 +146,7 @@ void HistoryExportDialog::exportHistory()
paymentId = "";
}
- const double usd_price = appData()->txFiatHistory->get(tx.timestamp.toString("yyyyMMdd"));
- double fiat_price = usd_price * tx.amountDouble();
- QString fiatAmount = (usd_price > 0) ? QString::number(fiat_price, 'f', 2) : "?";
-
- QString line = QString(R"(%1,%2,"%3",%4,"%5",%6,%7,%8,"%9","%10","%11","%12","%13")")
+ QString line = QString(R"(%1,%2,"%3",%4,"%5",%6,%7,%8,"%9","%10","%11")")
.arg(QString::number(tx.blockHeight),
QString::number(tx.timestamp.toSecsSinceEpoch()),
date,
@@ -162,17 +157,15 @@ void HistoryExportDialog::exportHistory()
tx.displayFee(),
tx.hash,
tx.description,
- paymentId,
- fiatAmount,
- "USD");
+ paymentId);
csvData.append({tx.blockHeight, line});
}
std::sort(csvData.begin(), csvData.end(), [](const QPair<uint64_t, QString> &tx1, const QPair<uint64_t, QString> &tx2){
return tx1.first < tx2.first;
});
- QString csvString = "blockHeight,timestamp,date,accountIndex,direction,balanceDelta,amount,fee,txid,description,paymentId,fiatAmount,fiatCurrency";
+ QString csvString = "blockHeight,timestamp,date,accountIndex,direction,balanceDelta,amount,fee,txid,description,paymentId";
for (const auto& data : csvData) {
csvString += "\n" + data.second;
}Why this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.