From aa5e023e96842eb32a7fc8fc03b7ed5777530b50 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 6 Feb 2024 12:32:16 +0200 Subject: [PATCH] fix: bugs fix & update rpc's --- .github/workflows/ipfs_deploy.yml | 2 +- .nvmrc | 2 +- README.md | 2 +- src/proposals/components/proposal/Details.tsx | 2 +- src/ui/components/NetworkIcon.tsx | 9 +++++---- src/utils/chains.ts | 6 ++++++ src/utils/localStorage.ts | 2 +- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ipfs_deploy.yml b/.github/workflows/ipfs_deploy.yml index 7f9df587..3a32c38d 100644 --- a/.github/workflows/ipfs_deploy.yml +++ b/.github/workflows/ipfs_deploy.yml @@ -61,5 +61,5 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, release_id: data.id, - body: data.body + `\n
\n Ipfs deployment: [${{steps.pinata.outputs.hash}}](${{steps.pinata.outputs.uri}})`, + body: data.body + `\n
\n Ipfs deployment:` + `${{steps.pinata.outputs.uri}}`, }) diff --git a/.nvmrc b/.nvmrc index 25bf17fc..2edeafb0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 \ No newline at end of file +20 \ No newline at end of file diff --git a/README.md b/README.md index 4cde5452..69deeefb 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ React application to interact with the Aave Governance V3 smart contracts: visua ## Pre-requirements -- [Node.js](https://nodejs.org/ru): version 18.17 or higher. +- [Node.js](https://nodejs.org/ru): version 18 or higher. - [Git](https://git-scm.com/downloads): version 2.3.x or higher. - Package manager: we recommend [Yarn](https://yarnpkg.com/), version 1.x or higher. diff --git a/src/proposals/components/proposal/Details.tsx b/src/proposals/components/proposal/Details.tsx index e392a7ca..cd0fa402 100644 --- a/src/proposals/components/proposal/Details.tsx +++ b/src/proposals/components/proposal/Details.tsx @@ -120,7 +120,7 @@ export function Details({ - + {(ensData[proposalCreator.toLocaleLowerCase() as Hex] ?.name as Hex) || proposalCreator} diff --git a/src/ui/components/NetworkIcon.tsx b/src/ui/components/NetworkIcon.tsx index 050abd2b..a6b79e02 100644 --- a/src/ui/components/NetworkIcon.tsx +++ b/src/ui/components/NetworkIcon.tsx @@ -1,4 +1,5 @@ import { Box, SxProps } from '@mui/system'; +import { useState } from 'react'; import { toHex } from 'viem'; import { arbitrum, @@ -73,8 +74,8 @@ export function NetworkIcon({ css, withTooltip, }: NetworkIconProps) { - const networkIconName = getIconNetworkName(chainId); - const chain = chainInfoHelper.getChainParameters(chainId); + const [networkIconName] = useState(getIconNetworkName(chainId)); + const [chain] = useState(chainInfoHelper.getChainParameters(chainId)); return ( <> @@ -103,7 +104,7 @@ export function NetworkIcon({ src={setRelativePath( `/images/networks/${networkIconName.toLowerCase()}.svg`, )} - alt={`${chainInfoHelper.getChainParameters(chainId).name} icon`} + alt={`${chain.name} icon`} /> ) : ( @@ -118,7 +119,7 @@ export function NetworkIcon({ src={setRelativePath( `/images/networks/${networkIconName.toLowerCase()}.svg`, )} - alt={`${chainInfoHelper.getChainParameters(chainId).name} icon`} + alt={`${chain.name} icon`} /> )} diff --git a/src/utils/chains.ts b/src/utils/chains.ts index 3f483950..7b34a59d 100644 --- a/src/utils/chains.ts +++ b/src/utils/chains.ts @@ -67,15 +67,21 @@ export const initialRpcUrls: Record = { 'https://metis.api.onfinality.io/public', ], [optimism.id]: [ + process.env.NEXT_PUBLIC_RPC_OPTIMISM || + 'https://endpoints.omniatech.io/v1/arbitrum/one/public', 'https://optimism.blockpi.network/v1/rpc/public', 'https://optimism.llamarpc.com', 'https://optimism.publicnode.com', ], [gnosis.id]: [ + process.env.NEXT_PUBLIC_RPC_GNOSIS || + 'https://endpoints.omniatech.io/v1/arbitrum/one/public', 'https://gnosis.blockpi.network/v1/rpc/public', 'https://gnosis-mainnet.public.blastapi.io', ], [scroll.id]: [ + process.env.NEXT_PUBLIC_RPC_SCROLL || + 'https://endpoints.omniatech.io/v1/arbitrum/one/public', 'https://scroll.blockpi.network/v1/rpc/public', 'https://scroll-mainnet.public.blastapi.io', ], diff --git a/src/utils/localStorage.ts b/src/utils/localStorage.ts index 7bb5f271..969e1592 100644 --- a/src/utils/localStorage.ts +++ b/src/utils/localStorage.ts @@ -10,7 +10,7 @@ import { EnsDataItem } from '../web3/store/ensSlice'; export enum LocalStorageKeys { EnsAddresses = 'EnsAddresses', - RpcUrls = 'URLsRPCs', + RpcUrls = 'UrlsRpcS', RepresentingAddresses = 'representingAddresses', GaslessVote = 'isGaslessVote', TermsAccept = 'termsAccept',