Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Checks for empty transactions to define getTransactions as compl…
…eted (#5874) # Motivation The `.some` function returns `false` when the transactions array is empty because it cannot find `null` (`oldestTxId`). This is an error, as it should handle this case. You can reproduce the issue by following these steps: - Navigate to the transactions page of a SubAccount with no transactions. - The `InfiniteScroll` will never be disabled as expected [here](https://github.com/dfinity/nns-dapp/blob/74767085476d849d58943233ea36da723aedf96a/frontend/src/lib/components/accounts/UiTransactionsList.svelte#L22). - However, since we check the size of transactions [here](https://github.com/dfinity/nns-dapp/blob/74767085476d849d58943233ea36da723aedf96a/frontend/src/lib/components/accounts/UiTransactionsList.svelte#L16), the bug does not have an impact. # Changes - Added a check to `oldestTxId` to determine whether `getTransactions` is complete. # Tests - Added new test to catch the empty flow. # Todos - [ ] Add entry to changelog (if necessary). Not necessary
- Loading branch information