Skip to content

Commit

Permalink
use 1 real rpc endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
bergeron committed Jun 13, 2024
1 parent abcddff commit 18e2b99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ const NetworksForm = ({
dataTestId="network-form-network-name"
/>
{window.metamaskFeatureFlags?.networkMenuRedesign ? (
<RpcUrlEditor />
<RpcUrlEditor currentRpcUrl={displayRpcUrl} />
) : (
<FormField
error={errors.rpcUrl?.msg || ''}
Expand Down
16 changes: 7 additions & 9 deletions ui/pages/settings/networks-tab/networks-form/rpc-url-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@ import {
} from '../../../../helpers/constants/design-system';
import { useI18nContext } from '../../../../hooks/useI18nContext';

export const RpcUrlEditor = () => {
export const RpcUrlEditor = ({ currentRpcUrl }: { currentRpcUrl: string }) => {
// TODO: real endpoints
const dummyRpcEndpoints = [
'https://palmn-mainnet.infura.io',
'https://palm-mainnet.public.blastapi.io',
'https://tatum.io/v3/blockchain/node/palm',
const dummyRpcUrls = [
currentRpcUrl,
'https://dummy-mainnet.public.blastapi.io',
'https://dummy.io/v3/blockchain/node/dummy',
];

const t = useI18nContext();
const rpcDropdown = useRef(null);
const [isOpen, setIsOpen] = useState(false);
const [currentRpcEndpoint, setCurrentRpcEndpoint] = useState(
dummyRpcEndpoints[0],
);
const [currentRpcEndpoint, setCurrentRpcEndpoint] = useState(currentRpcUrl);

return (
<>
Expand Down Expand Up @@ -74,7 +72,7 @@ export const RpcUrlEditor = () => {
position={PopoverPosition.Bottom}
isOpen={isOpen}
>
{dummyRpcEndpoints.map((rpcEndpoint) => (
{dummyRpcUrls.map((rpcEndpoint) => (
<Box
padding={4}
display={Display.Flex}
Expand Down

0 comments on commit 18e2b99

Please sign in to comment.