From c385354043a26c823875565554d99eed8673e0c2 Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 11 Sep 2024 14:01:16 -0300 Subject: [PATCH] fix: remove rpc array from network set up --- public/locales/en/common.json | 1 + public/locales/es/common.json | 1 + src/components/AddNetworkButton.tsx | 2 +- src/utils/addNetwork.ts | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 464dd5e..0c9e767 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -40,6 +40,7 @@ "environment": "Environment", "nativeToken": "Native token", "addNetwork": "Add network", + "addNetworkFailed": "Failed to add network", "networkAdded": "Network added", "chainId": "Chain ID", "CHAININFORMATION": { diff --git a/public/locales/es/common.json b/public/locales/es/common.json index 3e38891..7fa34cb 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -40,6 +40,7 @@ "environment": "Entorno", "nativeToken": "Token nativo", "addNetwork": "Agregar red", + "addNetworkFailed": "Error al agregar red", "networkAdded": "Red agregada", "chainId": "ID de cadena", "CHAININFORMATION": { diff --git a/src/components/AddNetworkButton.tsx b/src/components/AddNetworkButton.tsx index deb64c3..dd9ae5a 100644 --- a/src/components/AddNetworkButton.tsx +++ b/src/components/AddNetworkButton.tsx @@ -29,7 +29,7 @@ export const AddNetworkButton = () => { await addNetwork({ chainId: chain as string, chainName: chainData?.metadata.name, - rpcUrls: chainData?.metadata.publicRpcs, + rpcUrls: chainData?.metadata.publicRpcs[0], name: chainData?.baseToken.name, symbol: chainData?.baseToken.symbol, decimals: chainData?.baseToken.decimals, diff --git a/src/utils/addNetwork.ts b/src/utils/addNetwork.ts index 82f4d23..a1e18c1 100644 --- a/src/utils/addNetwork.ts +++ b/src/utils/addNetwork.ts @@ -1,7 +1,7 @@ interface AddNetwork { chainId: string; chainName: string; - rpcUrls: string[]; + rpcUrls: string; name: string; symbol: string; decimals: number;