diff --git a/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx b/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx index 55a67d9b..fc7d400f 100644 --- a/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx +++ b/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx @@ -25,7 +25,7 @@ export const SetGrpcEndpoint = () => {
- +
diff --git a/apps/extension/src/routes/popup/settings/settings-rpc.tsx b/apps/extension/src/routes/popup/settings/settings-rpc.tsx index 9e31224b..06e94a4e 100644 --- a/apps/extension/src/routes/popup/settings/settings-rpc.tsx +++ b/apps/extension/src/routes/popup/settings/settings-rpc.tsx @@ -27,7 +27,11 @@ export const SettingsRPC = () => { return ( - + ); }; diff --git a/apps/extension/src/shared/components/grpc-endpoint-form/index.tsx b/apps/extension/src/shared/components/grpc-endpoint-form/index.tsx index bea04e5c..8c3ea1c8 100644 --- a/apps/extension/src/shared/components/grpc-endpoint-form/index.tsx +++ b/apps/extension/src/shared/components/grpc-endpoint-form/index.tsx @@ -12,9 +12,11 @@ import { ChainIdOrError } from './chain-id-or-error'; */ export const GrpcEndpointForm = ({ submitButtonLabel, + isOnboarding, onSuccess, }: { submitButtonLabel: string; + isOnboarding: boolean; onSuccess: () => void | Promise; }) => { const { @@ -30,7 +32,7 @@ export const GrpcEndpointForm = ({ isSubmitButtonEnabled, isCustomGrpcEndpoint, isValidationLoading, - } = useGrpcEndpointForm(); + } = useGrpcEndpointForm(isOnboarding); const customGrpcEndpointInput = useRef(null); const handleSubmit = (e: FormEvent) => { diff --git a/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts b/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts index 770f330b..78ea65b9 100644 --- a/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts +++ b/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts @@ -23,7 +23,7 @@ const getRpcsFromRegistry = () => { return rpcs.toSorted(randomSort); }; -export const useGrpcEndpointForm = () => { +export const useGrpcEndpointForm = (isOnboarding: boolean) => { const grpcEndpoints = useMemo(() => getRpcsFromRegistry(), []); // Get the rpc set in storage (if present) @@ -105,7 +105,7 @@ export const useGrpcEndpointForm = () => { setIsSubmitButtonEnabled(false); // If the chain id has changed, our cache is invalid - if (chainIdChanged) { + if (!isOnboarding && chainIdChanged) { const promiseWithResolvers = Promise.withResolvers(); setConfirmChangedChainIdPromise(promiseWithResolvers);