Add FreeTrialSubdomainRegistrar mint UI and registrar integration; mobile v26 refactor#1471
Add FreeTrialSubdomainRegistrar mint UI and registrar integration; mobile v26 refactor#1471MontrealAI wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62e448a691
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if(!local.ok) return setToast(local.reason, 'warn'); | ||
| const recipient = String(el('mintAlphaRecipient')?.value || '').trim() || userAccount; | ||
| if(!web3.utils.isAddress(recipient)) return setToast('Recipient address is invalid.', 'bad'); | ||
| const available = await freeTrialRegistrar.methods.available(namehash(`${local.label}.${ALPHA_AGENT_PARENT}`)).call().catch(()=>false); |
There was a problem hiding this comment.
Guard mint call when registrar contract is uninitialized
The confirm step dereferences freeTrialRegistrar directly, so if the earlier full refresh fails before refreshFreeTrialRegistrarState() runs (for example, any prior read in refreshAll() throws), this path throws a TypeError instead of giving a recoverable UX path. That leaves users on mainnet with terms accepted unable to mint until they manually discover they must refresh registrar state first.
Useful? React with 👍 / 👎.
Motivation
*.alpha.agent.agi.ethENS names backed by the on-chainFreeTrialSubdomainRegistrarand make minting, preview and verification accessible to users.Description
mintGridinput panel,mintPreviewsummary, inline validation (mintLabelValidation) and a modal reviewalphaMintReviewModalwithopenAlphaMintReview/closeAlphaMintReviewflows andmintAlphaAgentNameto performregisterSimpleon the registrar.FreeTrialSubdomainRegistrarABI and contract reads, addedrefreshFreeTrialRegistrarStateto populate wrapper, trial period, label rules and parent status, and rendered registrar admin controls for authorized parent managers viarenderRegistrarAdminControls.normalizeAlphaLabel,validateAlphaLabelLocal, improved availability/contract validation logic and replaced numerous legacy functions/keys (localStorage key renamed toRECENT_ALPHA_AGENT_KEYand recent-name rendering updated).APP_STATE.registrar, addedfreeTrialcontract variables, wired command palette and mission actions to new mint flows, updated metadata/version strings (createdViaandbuildPacketBasefromv27→v26), and refactored mobile enhancement identifiers and classes fromv27→v26(CSS IDs, JS handlers and sheet/dock markup) for the release.Testing
Codex Task