Skip to content

Commit

Permalink
merge from dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jseagrave21 committed Jan 31, 2024
1 parent 3295a1b commit ad01dac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 11 additions & 1 deletion app/actions/transactionHistoryActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 }
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,11 @@ export default class TransactionHistory extends React.Component<Props> {
<Center
width="300px"
margin="auto"
paddingTop="12px"
paddingTop="36px"
paddingBottom="12px"
display="flex"
flexDirection="column"
>
<Box fontSize="14px" opacity={0.5} marginBottom="12px">
Displaying {transactions.length} of {count} transactions
</Box>

<Button
onClick={handleFetchAdditionalTxData}
primary
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7538,11 +7538,6 @@ dotenv-expand@^5.1.0:
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==

[email protected]:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

dotenv@^8.1.0, dotenv@^8.2.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
Expand Down

0 comments on commit ad01dac

Please sign in to comment.