@@ -1509,13 +1521,28 @@
${
transactions.length
- ? renderTransactions(wallet, transactions)
+ ? renderTransactions(wallet, visibleTransactions)
: `
No transactions found for this wallet.
`
}
+
+ ${
+ hasMore
+ ? `
+
+ `
+ : ''
+ }
`;
}
@@ -1539,7 +1566,10 @@
const dateText = timestamp
? formatDate(timestamp)
- : 'Loading...';
+ : transaction.height === null ||
+ transaction.height === undefined
+ ? 'Pending'
+ : `Block ${transaction.height}`;
const directionLabel =
display.direction === 'sent' ? 'Sent' : 'Received';
@@ -1710,19 +1740,6 @@
renderWallets();
- const wallet =
- wallets.find(
- (item) =>
- item.address === address,
- );
-
- if (!wallet) {
- return;
- }
-
- await loadWalletTransactionDetails(
- wallet,
- );
}
async function toggleTransaction(
@@ -1760,30 +1777,6 @@
await loadTransaction(txid);
}
- async function loadWalletTransactionDetails(
- wallet,
- ) {
- const transactions =
- getWalletTransactions(wallet);
-
- if (!transactions.length) {
- return;
- }
-
- /*
- * 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(
txid,
) {