Skip to content

Commit 82c1774

Browse files
fix(sign-submit): prefer file signer uuids in envelope submission
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c38c9ef commit 82c1774

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

src/services/signSubmit.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,25 @@ function getEnvelopeOwnSigners(document: SignDocumentForSubmission): Array<Envel
182182
ownSigners.push(signer)
183183
}
184184

185-
for (const signer of document.signers ?? []) {
186-
addSigner(signer)
187-
}
188-
185+
const fileOwnSigners: EnvelopeSigner[] = []
189186
for (const file of document.files ?? []) {
190187
for (const signer of file.signers ?? []) {
188+
if (isOwnEnvelopeSigner(signer)) {
189+
fileOwnSigners.push(signer)
190+
}
191+
}
192+
}
193+
194+
if (fileOwnSigners.length > 0) {
195+
for (const signer of fileOwnSigners) {
191196
addSigner(signer)
192197
}
198+
199+
return ownSigners
200+
}
201+
202+
for (const signer of document.signers ?? []) {
203+
addSigner(signer)
193204
}
194205

195206
return ownSigners

0 commit comments

Comments
 (0)