chore: update self signer logic

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
This commit is contained in:
Adithya Krishna
2024-05-08 17:02:01 +05:30
parent 6f6ed05569
commit 98672560ca

View File

@ -169,7 +169,7 @@ export const AddSignersFormPartial = ({
const onAddSelfSigner = () => { const onAddSelfSigner = () => {
const lastSignerIndex = signers.length - 1; const lastSignerIndex = signers.length - 1;
if (!signers[lastSignerIndex].name && !signers[lastSignerIndex].email) { if (signers[lastSignerIndex].email || signers[lastSignerIndex].name) {
onRemoveSigner(lastSignerIndex); onRemoveSigner(lastSignerIndex);
} }
if (emptySignerIndex !== -1) { if (emptySignerIndex !== -1) {
@ -268,7 +268,7 @@ export const AddSignersFormPartial = ({
disabled={ disabled={
isSubmitting || isSubmitting ||
hasBeenSentToRecipientId(signer.nativeId) || hasBeenSentToRecipientId(signer.nativeId) ||
signers[index].email === user?.email signers[index].name === user?.name
} }
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
/> />