Skip to content

Commit 4c058c2

Browse files
committedFeb 11, 2025
checker -> station
1 parent 692595c commit 4c058c2

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed
 

‎renderer/src/pages/dashboard/ActivityInfo.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import BorderedBox from 'src/components/BorderedBox'
22
import Text from 'src/components/Text'
3-
import useStationActivity from 'src/hooks/CheckerActivity'
3+
import useCheckerActivity from 'src/hooks/CheckerActivity'
44
import WarningIcon from 'src/assets/img/icons/warning.svg?react'
55
import JobIcon from 'src/assets/img/icons/job.svg?react'
66
import { Activity } from 'shared/typings'
@@ -24,7 +24,7 @@ const ActivityItem = ({ activity }: {activity: Activity}) => {
2424
}
2525

2626
const ActivityInfo = () => {
27-
const { totalJobs, activities } = useStationActivity()
27+
const { totalJobs, activities } = useCheckerActivity()
2828

2929
const activitiesByDate = useMemo(() => activities
3030
.sort((x, y) => y.timestamp.getTime() - x.timestamp.getTime())

‎renderer/src/pages/dashboard/Dashboard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import BorderedBox from 'src/components/BorderedBox'
22
import ActivityInfo from './ActivityInfo'
33
import ChartController from './ChartController'
4-
import useStationRewards from 'src/hooks/Rewards'
4+
import useCheckerRewards from 'src/hooks/Rewards'
55
import RewardsInfo from './RewardsInfo'
66
import { bigIntFilToNumber } from 'src/lib/utils'
77

88
const Dashboard = (): JSX.Element => {
9-
const { historicalRewards, totalRewardsReceived, scheduledRewards } = useStationRewards()
9+
const { historicalRewards, totalRewardsReceived, scheduledRewards } = useCheckerRewards()
1010

1111
return (
1212
<main className='gap-5 px-9 mt-28 flex-1 grid grid-rows-[auto_1fr] grid-cols-[1fr_217px] pb-6 animate-fadeIn'>

‎renderer/src/test/dashboard.test.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
} from 'src/lib/checker-config'
1212
import Dashboard from 'src/pages/dashboard/Dashboard'
1313
import useWallet from 'src/hooks/CheckerWallet'
14-
import useStationActivity from 'src/hooks/CheckerActivity'
14+
import useCheckerActivity from 'src/hooks/CheckerActivity'
1515
import { Activity } from '../../../shared/typings'
16-
import useStationRewards from 'src/hooks/Rewards'
16+
import useCheckerRewards from 'src/hooks/Rewards'
1717
import { stubGlobalElectron, renderApp } from './helpers'
1818
import { useEffect, useState } from 'react'
1919

@@ -54,11 +54,11 @@ describe('Dashboard page', () => {
5454
processingTransaction: undefined
5555
})
5656

57-
vi.mocked(useStationActivity).mockReturnValue({
57+
vi.mocked(useCheckerActivity).mockReturnValue({
5858
totalJobs: 0,
5959
activities: []
6060
})
61-
vi.mocked(useStationRewards).mockReturnValue({
61+
vi.mocked(useCheckerRewards).mockReturnValue({
6262
totalRewardsReceived: BigInt(1e18),
6363
scheduledRewards: BigInt(100 * 1e18),
6464
historicalRewards: []
@@ -96,7 +96,7 @@ describe('Dashboard page', () => {
9696
processingTransaction: undefined
9797
})
9898

99-
vi.mocked(useStationRewards).mockImplementation(() => {
99+
vi.mocked(useCheckerRewards).mockImplementation(() => {
100100
const [mockedRewards, setMockedRewards] = useState(0n)
101101

102102
useEffect(() => {
@@ -112,7 +112,7 @@ describe('Dashboard page', () => {
112112
}
113113
})
114114

115-
vi.mocked(useStationActivity).mockImplementation(() => {
115+
vi.mocked(useCheckerActivity).mockImplementation(() => {
116116
const [mockedActivities, setMockedActivities] = useState<Activity[]>([])
117117
const [mockedJobs, setMockedJobs] = useState(100)
118118

‎renderer/src/test/wallet-modal.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { fireEvent, act, screen } from '@testing-library/react'
33
import '@testing-library/jest-dom'
44
import 'src/lib/checker-config'
55
import Dashboard from 'src/pages/dashboard/Dashboard'
6-
import useStationActivity from 'src/hooks/CheckerActivity'
6+
import useCheckerActivity from 'src/hooks/CheckerActivity'
77
import useWallet from 'src/hooks/CheckerWallet'
8-
import useStationRewards from 'src/hooks/Rewards'
8+
import useCheckerRewards from 'src/hooks/Rewards'
99
import { renderApp, stubGlobalElectron } from './helpers'
1010

1111
const mockedSetDestinationWalletAddress = vi.fn()
@@ -42,11 +42,11 @@ describe('Dashboard wallet display', () => {
4242
transferAllFundsToDestinationWallet: async () => undefined
4343
})
4444

45-
vi.mocked(useStationActivity).mockReturnValue({
45+
vi.mocked(useCheckerActivity).mockReturnValue({
4646
totalJobs: 0,
4747
activities: []
4848
})
49-
vi.mocked(useStationRewards).mockReturnValue({
49+
vi.mocked(useCheckerRewards).mockReturnValue({
5050
totalRewardsReceived: BigInt(1e18),
5151
scheduledRewards: undefined,
5252
historicalRewards: []

0 commit comments

Comments
 (0)