@@ -61,6 +69,7 @@ export const Settings = () => {
title={i.title}
icon={i.icon}
onClick={() => navigate(i.href)}
+ disabled={i.href === PopupPath.SETTINGS_NUMERAIRES && numeraires.length === 0}
/>
))}
diff --git a/apps/extension/src/shared/components/default-frontend-form/index.tsx b/apps/extension/src/shared/components/default-frontend-form/index.tsx
index 8deb917b..6d509481 100644
--- a/apps/extension/src/shared/components/default-frontend-form/index.tsx
+++ b/apps/extension/src/shared/components/default-frontend-form/index.tsx
@@ -14,13 +14,17 @@ interface DisplayedFrontend {
}
const getFrontendsFromRegistry = (selectedRpc?: string): DisplayedFrontend[] => {
- const registryClient = new ChainRegistryClient();
- const { frontends } = registryClient.globals();
-
- const registeredFrontends = frontends.map(frontend => ({
- title: extractDomain(frontend),
- url: frontend,
- }));
+ let registeredFrontends: DisplayedFrontend[] = [];
+ try {
+ const registryClient = new ChainRegistryClient();
+ const { frontends } = registryClient.globals();
+ registeredFrontends = frontends.map(frontend => ({
+ title: extractDomain(frontend),
+ url: frontend,
+ }));
+ } catch (e) {
+ console.error('Registry globals is not available', e);
+ }
if (selectedRpc) {
registeredFrontends.push({ title: 'Embedded RPC frontend', url: `${selectedRpc}/app/` });
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..dcf2d90c 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
@@ -18,9 +18,14 @@ const useSaveGrpcEndpointSelector = (state: AllSlices) => ({
});
const getRpcsFromRegistry = () => {
- const registryClient = new ChainRegistryClient();
- const { rpcs } = registryClient.globals();
- return rpcs.toSorted(randomSort);
+ try {
+ const registryClient = new ChainRegistryClient();
+ const { rpcs } = registryClient.globals();
+ return rpcs.toSorted(randomSort);
+ } catch (e) {
+ console.error('Registry globals is not available', e);
+ return [];
+ }
};
export const useGrpcEndpointForm = () => {
diff --git a/apps/extension/src/shared/components/link.tsx b/apps/extension/src/shared/components/link.tsx
index 13073d56..892d6b38 100644
--- a/apps/extension/src/shared/components/link.tsx
+++ b/apps/extension/src/shared/components/link.tsx
@@ -5,12 +5,14 @@ interface LinkProps {
icon: ReactElement;
title: string;
onClick: () => void;
+ disabled?: boolean;
}
-export const CustomLink = ({ icon, title, onClick }: LinkProps) => {
+export const CustomLink = ({ icon, title, onClick, disabled }: LinkProps) => {
return (