@@ -1442,10 +1465,6 @@
${escapeHtml(lastActivityText)}
-
-
- ${expanded ? 'v' : '>'}
-
${
@@ -1485,11 +1504,7 @@
return `
${
@@ -1524,10 +1539,7 @@
const dateText = timestamp
? formatDate(timestamp)
- : transaction.height === null ||
- transaction.height === undefined
- ? 'Pending'
- : `Block ${transaction.height}`;
+ : 'Loading...';
const directionLabel =
display.direction === 'sent' ? 'Sent' : 'Received';
@@ -1754,32 +1766,22 @@
const transactions =
getWalletTransactions(wallet);
- /*
- * Only the latest transaction is loaded
- * immediately. The remaining transactions
- * are fetched when the user opens them.
- *
- * This keeps a wallet with many transactions
- * from creating dozens of Fulcrum requests
- * just by opening it.
- */
-
if (!transactions.length) {
return;
}
- const latest =
- transactions[0];
-
- if (
- !getTransactionFromCache(
- latest.txid,
- )
- ) {
- await loadTransaction(
- latest.txid,
- );
- }
+ /*
+ * Load transaction details in parallel so the
+ * list can populate dates and amounts without
+ * requiring the user to open each transaction.
+ *
+ * Cached transactions are skipped by loadTransaction().
+ */
+ await Promise.all(
+ transactions.map((transaction) =>
+ loadTransaction(transaction.txid),
+ ),
+ );
}
async function loadTransaction(