diff --git a/apps/renterd/components/Contracts/ContractsFilterBar.tsx b/apps/renterd/components/Contracts/ContractsFilterBar.tsx
index 407486579..865493d41 100644
--- a/apps/renterd/components/Contracts/ContractsFilterBar.tsx
+++ b/apps/renterd/components/Contracts/ContractsFilterBar.tsx
@@ -3,7 +3,7 @@ import { useContracts } from '../../contexts/contracts'
import { ContractsFilterMenu } from './ContractsFilterMenu'
export function ContractsFilterBar() {
- const { dataState, offset, limit, datasetCount, pageCount } = useContracts()
+ const { dataState, offset, limit, datasetFilteredCount, pageCount } = useContracts()
return (
@@ -13,7 +13,7 @@ export function ContractsFilterBar() {
isLoading={dataState === 'loading'}
offset={offset}
limit={limit}
- datasetTotal={datasetCount}
+ datasetTotal={datasetFilteredCount}
pageTotal={pageCount}
/>
diff --git a/apps/renterd/components/Files/checks/useNotEnoughContracts.tsx b/apps/renterd/components/Files/checks/useNotEnoughContracts.tsx
index cbcd56ca6..8aae16913 100644
--- a/apps/renterd/components/Files/checks/useNotEnoughContracts.tsx
+++ b/apps/renterd/components/Files/checks/useNotEnoughContracts.tsx
@@ -3,8 +3,7 @@ import { useRedundancySettings } from '../../../hooks/useRedundancySettings'
export function useNotEnoughContracts() {
const redundancy = useRedundancySettings()
- const { dataset, isLoading: isContractsLoading } = useContracts()
- const datasetCount = dataset?.length || 0
+ const { datasetCount, isLoading: isContractsLoading } = useContracts()
const active =
redundancy.data &&
diff --git a/apps/renterd/contexts/contracts/index.tsx b/apps/renterd/contexts/contracts/index.tsx
index 1eab64ee9..6173fdbdc 100644
--- a/apps/renterd/contexts/contracts/index.tsx
+++ b/apps/renterd/contexts/contracts/index.tsx
@@ -146,7 +146,8 @@ function useContractsMain() {
isLoading: response.isLoading,
error: response.error,
pageCount: datasetPage?.length || 0,
- datasetCount: datasetFiltered?.length || 0,
+ datasetCount: dataset?.length || 0,
+ datasetFilteredCount: datasetFiltered?.length || 0,
columns: filteredTableColumns,
dataset,
datasetPage,