Skip to content

Commit

Permalink
Improve handling of situations when the TX list is empty
Browse files Browse the repository at this point in the history
This can happen when filtering for TX method.
  • Loading branch information
csillag committed Jan 9, 2025
1 parent e6cec7d commit 07e7251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/components/Transactions/RuntimeTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
name={t('transactions.latest')}
isLoading={isLoading}
pagination={pagination}
emptyMessage={'No transactions found.'}
/>
)
}
4 changes: 3 additions & 1 deletion src/app/pages/RuntimeTransactionsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export const RuntimeTransactionsPage: FC = () => {
const { isLoading, isFetched, data } = transactionsQuery

const transactions = data?.data.transactions
setBeforeDateFromCollection(data?.data.transactions[0].timestamp)
if (transactions?.length) {
setBeforeDateFromCollection(data?.data.transactions[0].timestamp)
}

if (isFetched && pagination.selectedPage > 1 && !transactions?.length) {
throw AppErrors.PageDoesNotExist
Expand Down

0 comments on commit 07e7251

Please sign in to comment.