add multiple guardian endpoints for selection during onboarding#303
Open
0xnullifier wants to merge 3 commits into
Open
add multiple guardian endpoints for selection during onboarding#3030xnullifier wants to merge 3 commits into
0xnullifier wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for selecting among multiple Guardian providers (endpoints) during onboarding and in settings, instead of defaulting to a single Guardian URL.
Changes:
- Introduces a multi-provider Guardian catalog (
GUARDIAN_OPTIONS) and derives per-network endpoint lists. - Adds a new onboarding step and UI for choosing a Guardian provider, plus an informational drawer.
- Updates import flow and Guardian settings to use presets and normalize Guardian URLs.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/screens/onboarding/types.ts | Adds ChooseGuardian step and associated onboarding action type. |
| src/screens/onboarding/navigator.tsx | Wires the new Choose Guardian step into the onboarding navigator flow. |
| src/screens/onboarding/import-wallet-flow/ImportRecoveryMethod.tsx | Adds Guardian provider presets and sanitizes Guardian URL input before submit. |
| src/screens/onboarding/common/GuardianInfoDrawer.tsx | Adds a new drawer explaining what a Guardian is and does. |
| src/screens/onboarding/common/Confirmation.tsx | Adjusts loading handling to include creating in button loading state. |
| src/screens/onboarding/common/ChooseGuardian.tsx | Adds a new Guardian picker screen component used by onboarding and settings. |
| src/lib/shared/types.ts | Introduces GuardianOption type for selectable Guardian providers. |
| src/lib/settings/helpers.ts | Adds sanitizeGuardianUrl helper for normalized storage/comparison. |
| src/lib/settings/helpers.test.ts | Adds unit tests for sanitizeGuardianUrl. |
| src/lib/miden-chain/constants.ts | Adds multi-provider Guardian configuration and derives per-network endpoints + default. |
| src/lib/miden-chain/constants.test.ts | Adds tests for GUARDIAN_OPTIONS and derived MIDEN_GUARDIAN_ENDPOINTS. |
| src/app/templates/GuardianSettings.tsx | Replaces manual endpoint form with ChooseGuardianScreen and two-step confirmation logic. |
| src/app/pages/Welcome.tsx | Adds routing/handling for the new choose-guardian onboarding step. |
| src/app/icons/onboarding/guardian-avatar.svg | Adds Guardian avatar icon for the new picker UI. |
| public/_locales/zh_TW/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/zh_CN/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/uk/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/tr/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/ru/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/pt/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/pl/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/ko/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/ja/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/fr/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/es/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/en/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/en/en.json | Adds localized strings for the Guardian picker/info drawer (app locale file). |
| public/_locales/en_GB/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| public/_locales/de/messages.json | Adds localized strings for the Guardian picker/info drawer. |
| CHANGELOG.md | Documents the new multi-Guardian selection feature for the next release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,5 @@ | |||
| import { MidenMessageType, MidenRequest, MidenResponse } from 'lib/miden/types'; | |||
| import { MIDEN_NETWORK_NAME } from 'lib/miden-chain/constants'; | |||
Comment on lines
+70
to
+76
| const [selectedId, setSelectedId] = useState<string>(defaultId); | ||
|
|
||
| const handleSelect = (id: string) => { | ||
| hapticLight(); | ||
| setSelectedId(id); | ||
| setIsCustom(false); | ||
| }; |
| <div className="mt-4 flex flex-col gap-2" onClick={e => e.stopPropagation()}> | ||
| <div className="grid grid-cols-3 gap-2"> | ||
| {guardianPresets.map(provider => { | ||
| const isActive = !isCustomizing && endpointInput.trim() === provider.endpoint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.