MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / handleAddNewRecipients

Function handleAddNewRecipients

apps/OpenSign/src/pages/PlaceHolderSign.jsx:1672–1696  ·  view source on GitHub ↗
(data, signerRole)

Source from the content-addressed store, hash-verified

1670 };
1671 //function to add new signer in document signers list
1672 const handleAddNewRecipients = (data, signerRole) => {
1673 const newId = randomId();
1674 const backgroundColor = color[signersdata.length];
1675 const newSigner = {
1676 ...data,
1677 className: "contracts_Contactbook",
1678 Id: newId,
1679 blockColor: backgroundColor,
1680 };
1681 setSignersData((prev) => [...(prev || []), newSigner]);
1682 const signerPosObj = {
1683 signerPtr: {
1684 __type: "Pointer",
1685 className: "contracts_Contactbook",
1686 objectId: data.objectId
1687 },
1688 signerObjId: data.objectId,
1689 blockColor: backgroundColor,
1690 Id: newId,
1691 };
1692 setSignerPos((prev) => [...(prev || []), signerPosObj]);
1693 setUniqueId(newId);
1694 setIsSelectId(signersdata.length);
1695 return newId;
1696 };
1697
1698 const closePopup = () => {
1699 setIsAddUser({});

Callers 1

handleAddUserFunction · 0.85

Calls 1

randomIdFunction · 0.90

Tested by

no test coverage detected