Earlier, the DocumentProofTypeCheck() function was iterating through all the Signers corresponding to Document's Author, and it was asserted against the verificationMethodId from the Document's Proof. The problem was when the assertion failed, it threw an error that stated that required verification method id was not found, even though it was present in the Singer.
The function is refactored to iterate over all the signers and pick the singer's VM Id that matches with Verification Method ID present in Document's proof without breaking on non-matching cases.
Reference issue: https://github.com/hypersign-protocol/hid-node/issues/324
Earlier, the
DocumentProofTypeCheck()
function was iterating through all the Signers corresponding to Document's Author, and it was asserted against theverificationMethodId
from the Document'sProof
. The problem was when the assertion failed, it threw an error that stated that required verification method id was not found, even though it was present in the Singer.The function is refactored to iterate over all the signers and pick the singer's VM Id that matches with Verification Method ID present in Document's proof without breaking on non-matching cases.