Skip to content

Commit

Permalink
update variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jseagrave21 committed Jan 28, 2024
1 parent baeb785 commit 2fd36f8
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions app/actions/transactionHistoryActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ export default createActions(
const network = net === 'MainNet' ? 'mainnet' : 'testnet'
const data = await NeoRest.addressTXFull(address, page, network)
parsedEntries = await computeN3Activity(data, address, net)
// check to see if there is another page
const nextPage = page + 1
const testData = await NeoRest.addressTXFull(address, nextPage, network)
const testCount = testData.totalCount
if (typeof testCount !== 'undefined') count = true
} else {
const network = net === 'MainNet' ? 'mainnet' : 'testnet'
const data = await NeoLegacyREST.getAddressAbstracts(
Expand All @@ -237,21 +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
// eslint-disable-next-line
if (count == true) count = entries.length + 1
// eslint-disable-next-line
if (count == false) count = entries.length
if (chain === 'neo3' && nextPage === false) count = entries.length
return { entries, count }
}
entries = [...parsedEntries]
// eslint-disable-next-line
if (count == true) count = entries.length + 1
// eslint-disable-next-line
if (count == false) count = entries.length
if (chain === 'neo3' && nextPage === false) count = entries.length
return { entries, count }
},
)

0 comments on commit 2fd36f8

Please sign in to comment.