Skip to content

Commit

Permalink
fix: missing type
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendn committed Feb 20, 2023
1 parent 512bb4b commit 8e5d850
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ interface CommonStatsResponse {
result: CommonStats
}

interface GasTrackerResponse {
result: GasTracker
}

interface GasTracker {
result: {
average: number
fast: number
slow: number
}
average: number
fast: number
slow: number
}

interface LatestBlock {
Expand Down
2 changes: 1 addition & 1 deletion views/homepage/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Overview = () => {
const { data: commonStatsDataRaw, error: commonStatsError } = useSWR<CommonStatsResponse>(
_fetchCondition('common-stats')
)
const { data: gasAvgRaw, error: gasAvgError } = useSWR<GasTracker>(_fetchCondition('gas_avg'))
const { data: gasAvgRaw, error: gasAvgError } = useSWR<GasTrackerResponse>(_fetchCondition('gas_avg'))

const estimateCountedData = getEstimateCountedData(estimateCountedDataRaw?.result)
const commonStatsData = getCommonStatsData(commonStatsDataRaw?.result)
Expand Down

0 comments on commit 8e5d850

Please sign in to comment.