Skip to content

Commit

Permalink
add alert exporting transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThierryM1212 committed Mar 1, 2022
1 parent 4fb76d3 commit fa73fa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/components/DownloadTxListCSV.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { CSVLink } from "react-csv";
import { getUtxoBalanceForAddressList } from '../ergo-related/utxos';
import { waitingAlert } from '../utils/Alerts';
import { formatERGAmount, formatTokenAmount, getTransactionsForAddressList, getWalletAddressList, getWalletById } from "../utils/walletUtils";
import ImageButton from './ImageButton';

Expand Down Expand Up @@ -52,6 +53,7 @@ export default class DownloadTxListCSV extends React.Component {
loading: true
});
try {
const alert = waitingAlert("Loading transactions...");
const wallet = getWalletById(this.state.walletId);
const walletAddressList = getWalletAddressList(wallet);
const allTxList = (await getTransactionsForAddressList(walletAddressList, this.state.numberOfTransactions + 10))
Expand All @@ -64,6 +66,7 @@ export default class DownloadTxListCSV extends React.Component {
const balance = await getUtxoBalanceForAddressList(transaction.inputs, transaction.outputs, walletAddressList);
return balance;
}));
alert.close();
console.log("exportCSVTransactionList", allTxList, transactionBalances);
var csvList = [];
for (const i in allTxList) {
Expand Down

0 comments on commit fa73fa3

Please sign in to comment.