Skip to content

Commit 77da58d

Browse files
committed
refactor: require numeric signing ids
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 2fe5a0b commit 77da58d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/services/SigningRequirementValidator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { ACTION_CODES } from '../helpers/ActionMapping.ts'
88
interface SignStore {
99
errors: Array<{ code?: number; [key: string]: unknown }>
1010
document?: {
11-
signers?: Array<{ me?: boolean; signRequestId?: string | number }> | null
12-
visibleElements?: Array<{ signRequestId?: string | number }> | null
11+
signers?: Array<{ me?: boolean; signRequestId?: number }> | null
12+
visibleElements?: Array<{ signRequestId?: number }> | null
1313
}
1414
}
1515

@@ -111,13 +111,13 @@ export class SigningRequirementValidator {
111111
}
112112

113113
const signer = this.signStore.document?.signers?.find(row => row.me) || {}
114-
const signRequestId = (signer as { signRequestId?: string | number }).signRequestId
114+
const signRequestId = (signer as { signRequestId?: number }).signRequestId
115115

116116
if (!signRequestId) {
117117
return false
118118
}
119119

120120
const visibleElements = this.signStore.document?.visibleElements || []
121-
return visibleElements.some(row => String(row.signRequestId) === String(signRequestId))
121+
return visibleElements.some(row => row.signRequestId === signRequestId)
122122
}
123123
}

0 commit comments

Comments
 (0)