diff --git a/apps/extension/package.json b/apps/extension/package.json index ee6f54a2..461b5303 100644 --- a/apps/extension/package.json +++ b/apps/extension/package.json @@ -18,7 +18,7 @@ "@bufbuild/protobuf": "^1.x", "@connectrpc/connect": "^1.x", "@connectrpc/connect-web": "^1.x", - "@penumbra-labs/registry": "^12.0.0", + "@penumbra-labs/registry": "^12.1.0", "@penumbra-zone/bech32m": "11.0.0", "@penumbra-zone/client": "22.0.0", "@penumbra-zone/crypto-web": "32.0.0", diff --git a/apps/extension/src/routes/page/onboarding/password/utils.ts b/apps/extension/src/routes/page/onboarding/password/utils.ts index b49e5205..52bb8f73 100644 --- a/apps/extension/src/routes/page/onboarding/password/utils.ts +++ b/apps/extension/src/routes/page/onboarding/password/utils.ts @@ -2,7 +2,7 @@ import { Location } from 'react-router-dom'; import { LocationState, SEED_PHRASE_ORIGIN } from './types'; import { PagePath } from '../../paths'; import { usePageNav } from '../../../../utils/navigate'; -import { ChainRegistryClient } from '@penumbra-labs/registry'; +import { ChainRegistryClient, EntityMetadata } from '@penumbra-labs/registry'; import { sample } from 'lodash'; import { createPromiseClient } from '@connectrpc/connect'; import { createGrpcWebTransport } from '@connectrpc/connect-web'; @@ -34,8 +34,20 @@ const DEFAULT_TRANSPORT_OPTS = { timeoutMs: 5000 }; export const setOnboardingValuesInStorage = async (seedPhraseOrigin: SEED_PHRASE_ORIGIN) => { const chainRegistryClient = new ChainRegistryClient(); const { rpcs, frontends } = await chainRegistryClient.remote.globals(); - const randomFrontend = sample(frontends); - if (!randomFrontend) { + + // Define a canconcial default frontend + const defaultFront = 'Radiant Commons'; + + let selectedFrontend: EntityMetadata | undefined = frontends.find( + frontend => frontend.name === defaultFront, + ); + + // If default frontend is not found, randomly select a frontend + if (!selectedFrontend) { + selectedFrontend = sample(frontends); + } + + if (!selectedFrontend) { throw new Error('Registry missing frontends'); } @@ -57,7 +69,7 @@ export const setOnboardingValuesInStorage = async (seedPhraseOrigin: SEED_PHRASE const { numeraires } = await chainRegistryClient.remote.get(appParameters.chainId); await localExtStorage.set('grpcEndpoint', rpc); - await localExtStorage.set('frontendUrl', randomFrontend.url); + await localExtStorage.set('frontendUrl', selectedFrontend.url); await localExtStorage.set( 'numeraires', numeraires.map(n => n.toJsonString()), diff --git a/packages/context/package.json b/packages/context/package.json index 96a32985..ae4f542a 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -17,7 +17,7 @@ }, "peerDependencies": { "@bufbuild/protobuf": "^1.x", - "@penumbra-labs/registry": "^12.0.0", + "@penumbra-labs/registry": "^12.1.0", "@penumbra-zone/bech32m": "11.0.0", "@penumbra-zone/crypto-web": "32.0.0", "@penumbra-zone/getters": "21.0.0", diff --git a/packages/ui/package.json b/packages/ui/package.json index 881bdead..05a19e28 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,7 +29,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@penumbra-labs/registry": "^12.0.0", + "@penumbra-labs/registry": "^12.1.0", "@penumbra-zone/bech32m": "11.0.0", "@penumbra-zone/getters": "21.0.0", "@penumbra-zone/perspective": "42.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf540471..a7164fd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,8 +87,8 @@ importers: specifier: ^1.x version: 1.4.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.4.0(@bufbuild/protobuf@1.10.0)) '@penumbra-labs/registry': - specifier: ^12.0.0 - version: 12.0.0 + specifier: ^12.1.0 + version: 12.1.0 '@penumbra-zone/bech32m': specifier: 11.0.0 version: 11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) @@ -115,10 +115,10 @@ importers: version: link:../../packages/query '@penumbra-zone/services': specifier: 47.0.0 - version: 47.0.0(6fps6z5uuk6epgzufahiywxosy) + version: 47.0.0(a4kvhbyq3zzvfqzovgkdkkljkq) '@penumbra-zone/storage': specifier: 42.0.0 - version: 42.0.0(l65mk6ilmsmeu3y7rncvtveyd4) + version: 42.0.0(gurpzwyiul6ia5cgcso2wz7pke) '@penumbra-zone/transport-chrome': specifier: 8.0.1 version: 8.0.1(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.4.0(@bufbuild/protobuf@1.10.0))(@penumbra-zone/transport-dom@7.5.0) @@ -256,8 +256,8 @@ importers: specifier: ^1.x version: 1.10.0 '@penumbra-labs/registry': - specifier: ^12.0.0 - version: 12.0.0 + specifier: ^12.1.0 + version: 12.1.0 '@penumbra-zone/bech32m': specifier: 11.0.0 version: 11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) @@ -281,10 +281,10 @@ importers: version: link:../query '@penumbra-zone/services': specifier: 47.0.0 - version: 47.0.0(6fps6z5uuk6epgzufahiywxosy) + version: 47.0.0(a4kvhbyq3zzvfqzovgkdkkljkq) '@penumbra-zone/storage': specifier: 42.0.0 - version: 42.0.0(l65mk6ilmsmeu3y7rncvtveyd4) + version: 42.0.0(gurpzwyiul6ia5cgcso2wz7pke) '@penumbra-zone/transport-chrome': specifier: 8.0.1 version: 8.0.1(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.4.0(@bufbuild/protobuf@1.10.0))(@penumbra-zone/transport-dom@7.5.0) @@ -369,8 +369,8 @@ importers: specifier: ^11.14.0 version: 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1) '@penumbra-labs/registry': - specifier: ^12.0.0 - version: 12.0.0 + specifier: ^12.1.0 + version: 12.1.0 '@penumbra-zone/bech32m': specifier: 11.0.0 version: 11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) @@ -1639,8 +1639,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@penumbra-labs/registry@12.0.0': - resolution: {integrity: sha512-fQ4onHovusiOZL2nhoCoEo+/sQovK9NAQmNvehIw7Q0dhw9InXIZBTUSOKujhvyrcca+vA9FsaHWr0DSv/pDsw==} + '@penumbra-labs/registry@12.1.0': + resolution: {integrity: sha512-hBzCCJ9bykaJ86fW3J9IRjVIXuxGEsidTIhYwuLYEKpYkAhfHe3J4M5LR6gVU5XoqIx39QfeYf9j0cFIwHZlQQ==} '@penumbra-zone/bech32m@11.0.0': resolution: {integrity: sha512-GXBawCDEaEMMYSo8WIbpM0l8NbJC9gZMHS5ttDPNH1SC7LfMGzjvZeMHvNulNV3cLZJSrmxxTIbg78QKWNsldw==} @@ -9426,7 +9426,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@penumbra-labs/registry@12.0.0': {} + '@penumbra-labs/registry@12.1.0': {} '@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0))': dependencies: @@ -9496,7 +9496,7 @@ snapshots: dependencies: '@bufbuild/protobuf': 1.10.0 - '@penumbra-zone/services@47.0.0(6fps6z5uuk6epgzufahiywxosy)': + '@penumbra-zone/services@47.0.0(a4kvhbyq3zzvfqzovgkdkkljkq)': dependencies: '@bufbuild/protobuf': 1.10.0 '@connectrpc/connect': 1.4.0(@bufbuild/protobuf@1.10.0) @@ -9504,15 +9504,15 @@ snapshots: '@penumbra-zone/crypto-web': 32.0.0(@penumbra-zone/types@27.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/getters@21.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0))) '@penumbra-zone/getters': 21.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) '@penumbra-zone/protobuf': 7.0.0(@bufbuild/protobuf@1.10.0) - '@penumbra-zone/storage': 42.0.0(l65mk6ilmsmeu3y7rncvtveyd4) + '@penumbra-zone/storage': 42.0.0(gurpzwyiul6ia5cgcso2wz7pke) '@penumbra-zone/transport-dom': 7.5.0 '@penumbra-zone/types': 27.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/getters@21.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) '@penumbra-zone/wasm': 36.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0))(@penumbra-zone/types@27.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/getters@21.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0))) - '@penumbra-zone/storage@42.0.0(l65mk6ilmsmeu3y7rncvtveyd4)': + '@penumbra-zone/storage@42.0.0(gurpzwyiul6ia5cgcso2wz7pke)': dependencies: '@bufbuild/protobuf': 1.10.0 - '@penumbra-labs/registry': 12.0.0 + '@penumbra-labs/registry': 12.1.0 '@penumbra-zone/bech32m': 11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) '@penumbra-zone/getters': 21.0.0(@bufbuild/protobuf@1.10.0)(@penumbra-zone/bech32m@11.0.0(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)))(@penumbra-zone/protobuf@7.0.0(@bufbuild/protobuf@1.10.0)) '@penumbra-zone/protobuf': 7.0.0(@bufbuild/protobuf@1.10.0)