From ad01dac3bb8b836a0f82d5bc99626189bae4b72d Mon Sep 17 00:00:00 2001 From: jseagrave21 Date: Wed, 31 Jan 2024 07:43:54 -0500 Subject: [PATCH] merge from dev --- app/actions/transactionHistoryActions.js | 12 +++++++++++- .../TransactionHistoryPanel.jsx | 6 +----- yarn.lock | 5 ----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/actions/transactionHistoryActions.js b/app/actions/transactionHistoryActions.js index 37786973d..275610b8a 100644 --- a/app/actions/transactionHistoryActions.js +++ b/app/actions/transactionHistoryActions.js @@ -220,7 +220,6 @@ export default createActions( if (chain === 'neo3') { const network = net === 'MainNet' ? 'mainnet' : 'testnet' const data = await NeoRest.addressTXFull(address, page, network) - count = data.totalCount parsedEntries = await computeN3Activity(data, address, net) } else { const network = net === 'MainNet' ? 'mainnet' : 'testnet' @@ -233,12 +232,23 @@ export default createActions( parsedEntries = await parseAbstractData(data.entries, address, net) } page += 1 + + // check to see if there is another page + let nextPage = true + const network = net === 'MainNet' ? 'mainnet' : 'testnet' + const testData = await NeoRest.addressTXFull(address, page, network) + const testCount = testData.totalCount + if (typeof testCount === 'undefined') nextPage = false + if (shouldIncrementPagination) { if (page === 1) entries = [] entries.push(...parsedEntries) + // handle the option to load more transactions for neo3 + if (chain === 'neo3' && nextPage === false) count = entries.length return { entries, count } } entries = [...parsedEntries] + if (chain === 'neo3' && nextPage === false) count = entries.length return { entries, count } }, ) diff --git a/app/components/TransactionHistory/TransactionHistoryPanel/TransactionHistoryPanel.jsx b/app/components/TransactionHistory/TransactionHistoryPanel/TransactionHistoryPanel.jsx index 31e96a535..8cb4a2fc3 100644 --- a/app/components/TransactionHistory/TransactionHistoryPanel/TransactionHistoryPanel.jsx +++ b/app/components/TransactionHistory/TransactionHistoryPanel/TransactionHistoryPanel.jsx @@ -60,15 +60,11 @@ export default class TransactionHistory extends React.Component {
- - Displaying {transactions.length} of {count} transactions - -