File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ export async function fetchEthereumEcosystemData() {
4
4
const url = `${ COINGECKO_API_BASE_URL } ethereum-ecosystem${ COINGECKO_API_URL_PARAMS } `
5
5
6
6
try {
7
- const ethereumEcosystemData = await fetch ( url ) . then ( ( res ) => res . json ( ) )
7
+ const res = await fetch ( url )
8
8
9
- return ethereumEcosystemData
9
+ return res . json ( )
10
10
} catch ( error ) {
11
11
// In production mode, throw an error to stop the build in case this fetch fails
12
12
console . error ( error )
@@ -20,14 +20,14 @@ export async function fetchEthereumStablecoinsData() {
20
20
const url = `${ COINGECKO_API_BASE_URL } stablecoins${ COINGECKO_API_URL_PARAMS } `
21
21
22
22
try {
23
- const ethereumStablecoinsData = await fetch ( url ) . then ( ( res ) => res . json ( ) )
23
+ const res = await fetch ( url )
24
24
25
- return ethereumStablecoinsData
25
+ return res . json ( )
26
26
} catch ( error ) {
27
27
// In production mode, throw an error to stop the build in case this fetch fails
28
28
console . error ( error )
29
29
throw new Error (
30
- "Something went wrong with requesting the Ethereum ecosystem data."
30
+ "Something went wrong with requesting the Ethereum stablecoins data."
31
31
)
32
32
}
33
33
}
You can’t perform that action at this time.
0 commit comments