diff --git a/services/concepts/curl.md b/services/concepts/curl.md index 5b4e34db70b..7f9cdfa0b7c 100644 --- a/services/concepts/curl.md +++ b/services/concepts/curl.md @@ -74,7 +74,7 @@ The example specifies the `Content-Type` to be `application/json` which means th The `-d` or `--data` flag specifies more information sent along with the curl request. -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. +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. The `method`, `params`, and `id` values are modifiable. diff --git a/src/components/GasApiNetworks.tsx b/src/components/GasApiNetworks.tsx index 3d9e5146921..9967782e152 100644 --- a/src/components/GasApiNetworks.tsx +++ b/src/components/GasApiNetworks.tsx @@ -1,13 +1,17 @@ import React, { useEffect, useState } from 'react'; +interface NetworkData { + [chainId: string]: string; +} + const GasApiNetworks = () => { - const [networks, setNetworks] = useState({}); + const [networks, setNetworks] = useState({}); useEffect(() => { const fetchData = async () => { try { const response = await fetch('https://gas.api.cx.metamask.io/v1/supportedChainNames'); - const data = await response.json(); + const data: NetworkData = await response.json(); setNetworks(data); } catch (error) { console.error('Error fetching data:', error);