Skip to content

Commit 4598163

Browse files
committed
build cleanup
1 parent 0ef59bf commit 4598163

File tree

4 files changed

+2
-39
lines changed

4 files changed

+2
-39
lines changed

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
"twitter:random": "ts-node src/tools/twitter-random",
1919
"twitter:tip": "ts-node src/tools/twitter-tip",
2020
"twitter:top": "ts-node src/tools/twitter-top",
21-
"gas:fetch": "ts-node src/tools/gas-fetch",
22-
"gas:index": "ts-node src/tools/gas-indexer",
2321
"newsletter": "ts-node src/tools/newsletter",
2422
"reddit": "ts-node src/tools/reddit",
2523
"awesome": "ts-node src/tools/awesome"

src/pages/api/indexer.tsx

-15
This file was deleted.

src/services/indexer.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { GasFee } from 'types/gas'
22

3-
const defaultBlockLimit = 10
4-
53
export type NETWORKS = 'mainnet' | 'polygon' | 'optimism' | 'arbitrum' | 'base'
64

75
export async function GetGasData(network: NETWORKS = 'mainnet') {
@@ -17,8 +15,7 @@ export async function GetGasData(network: NETWORKS = 'mainnet') {
1715
lastHour: Math.round(average * 100) / 100,
1816
fees: body.data.blocks,
1917
}
20-
}
21-
catch (error) {
18+
} catch (error) {
2219
console.error('Error:', error)
2320
}
2421

@@ -35,8 +32,7 @@ export async function GetAverage(period: 'hour' | 'day', limit: number = 24, net
3532
const res = await fetch(`https://www.ethgastracker.com/api/gas/average/${network}`)
3633
const body = await res.json()
3734
return body.data.data
38-
}
39-
catch (error) {
35+
} catch (error) {
4036
console.error('Error:', error)
4137
}
4238
}

src/tools/gas-indexer.ts

-16
This file was deleted.

0 commit comments

Comments
 (0)