Skip to content

Commit

Permalink
Fix issue with exporting single address
Browse files Browse the repository at this point in the history
  • Loading branch information
psyraxaus committed May 3, 2024
1 parent 2185fd4 commit 6211aef
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ const saveExportedTransactions = exports.saveExportedTransactions = async (targ
};

const exportSingleAddressTransactions = exports.exportSingleAddressTransactions = async (targetWindow, addressStr, csvFormat) => {
let db = new sqlite3.Database(dbPath, (err) => {
if (err) {
dbErrorBox(err, 'connecting to');
}
});
dialog.showSaveDialog(targetWindow, {
properties: ['saveFile'],
defaultPath: app.getPath('documents'),
Expand All @@ -150,6 +145,11 @@ const exportSingleAddressTransactions = exports.exportSingleAddressTransactions
]
}).then(result => {
if (result.filePath) {
let db = new sqlite3.Database(dbPath, (err) => {
if (err) {
dbErrorBox(err, 'connecting to');
}
});
_saveExportedFile(db, targetWindow, result.filePath.toString(), csvFormat, '', addressStr);
targetWindow.webContents.send('task-running', `Successfully saved file to ${result.filePath.toString()}`);
}
Expand Down Expand Up @@ -503,7 +503,6 @@ const _saveExportedFile = async (db, targetWindow, file, csvFormat, walletSource
AND vins <> "zsoVG9Evw68te8hRAP3xPXSbx9HoH26LUYN"
AND vins <> "zsi4CcCUYtR1iNjEyjkLPjSVPzSPa4atxt9"
AND vouts <> transactions.address`;

allTransactionsStr = await _formatTransactionsForExport(targetWindow, nodePayFromAddrs, db, nonConsolSqlQuery, consoldateSqlQuery, consolidateIntTxnsQuery, walletSourceName, addressStr);
dateFormat = 'Time (UTC)';
break;
Expand Down

0 comments on commit 6211aef

Please sign in to comment.