diff --git a/packages/ui/primitives/document-flow/add-signers.tsx b/packages/ui/primitives/document-flow/add-signers.tsx index ce86cff42..72b1f0b5b 100644 --- a/packages/ui/primitives/document-flow/add-signers.tsx +++ b/packages/ui/primitives/document-flow/add-signers.tsx @@ -201,10 +201,12 @@ export const AddSignersFormPartial = ({ return; } - removeSigner(index); - - const updatedSigners = signers.filter((_, idx) => idx !== index); - form.setValue('signers', normalizeSigningOrders(updatedSigners)); + const formStateIndex = form.getValues('signers').findIndex((s) => s.formId === signer.formId); + if (formStateIndex !== -1) { + removeSigner(formStateIndex); + const updatedSigners = form.getValues('signers').filter((s) => s.formId !== signer.formId); + form.setValue('signers', normalizeSigningOrders(updatedSigners)); + } }; const onAddSelfSigner = () => {