Skip to content

Commit 9e4f5a2

Browse files
Fix code base lint error (#1936)
1 parent eba4e42 commit 9e4f5a2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

services/concepts/curl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The example specifies the `Content-Type` to be `application/json` which means th
7474

7575
The `-d` or `--data` flag specifies more information sent along with the curl request.
7676

77-
In the example, the data object is a list of key value pairs in JSON format. This follows the [JSON RPC 2.0 specification ](https://www.jsonrpc.org/specification)which requires the four specific keys seen here.
77+
In the example, the data object is a list of key value pairs in JSON format. This follows the [JSON RPC 2.0 specification](https://www.jsonrpc.org/specification) which requires the four specific keys seen here.
7878

7979
The `method`, `params`, and `id` values are modifiable.
8080

src/components/GasApiNetworks.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import React, { useEffect, useState } from 'react';
22

3+
interface NetworkData {
4+
[chainId: string]: string;
5+
}
6+
37
const GasApiNetworks = () => {
4-
const [networks, setNetworks] = useState({});
8+
const [networks, setNetworks] = useState<NetworkData>({});
59

610
useEffect(() => {
711
const fetchData = async () => {
812
try {
913
const response = await fetch('https://gas.api.cx.metamask.io/v1/supportedChainNames');
10-
const data = await response.json();
14+
const data: NetworkData = await response.json();
1115
setNetworks(data);
1216
} catch (error) {
1317
console.error('Error fetching data:', error);

0 commit comments

Comments
 (0)