From 33ad66aa066ce1724930634999c9f6746e11657d Mon Sep 17 00:00:00 2001 From: BoHsuu Date: Thu, 21 May 2026 17:02:53 +0700 Subject: [PATCH] feat(nextjs): allow creating accounts with a single signer (1-of-1) --- .../NewAccount/NewAccountContainer.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/nextjs/components/NewAccount/NewAccountContainer.tsx b/packages/nextjs/components/NewAccount/NewAccountContainer.tsx index 5f6960c..99a091c 100644 --- a/packages/nextjs/components/NewAccount/NewAccountContainer.tsx +++ b/packages/nextjs/components/NewAccount/NewAccountContainer.tsx @@ -35,11 +35,8 @@ export default function NewAccountContainer() { schema: createAccountSchema, defaultValues: { name: "", - signers: [ - { name: "", commitment: commitment || "" }, - { name: "", commitment: "" }, - ], - threshold: 2, + signers: [{ name: "", commitment: commitment || "" }], + threshold: 1, }, }); @@ -114,11 +111,8 @@ export default function NewAccountContainer() { if (commitment) { form.reset({ name: "", - signers: [ - { name: "", commitment }, - { name: "", commitment: "" }, - ], - threshold: 2, + signers: [{ name: "", commitment }], + threshold: 1, }); // Reset to step 1 when account changes setCurrentStep(1); @@ -131,7 +125,7 @@ export default function NewAccountContainer() { const validSigners = getValidSigners(formData.signers); const isNameValid = formData.name.trim().length > 0; const isSignersValid = - validSigners.length >= 2 && formData.threshold >= 2 && formData.threshold <= validSigners.length; + validSigners.length >= 1 && formData.threshold >= 1 && formData.threshold <= validSigners.length; const isCreating = isCreatingSingle || isCreatingBatch; const EarthBackground = (