Conversation
| UNEXPECTED_ERROR = 0, | ||
| DOCUMENT_REVOKED = 1, | ||
| CONTRACT_ADDRESS_INVALID = 2, | ||
| ETHERS_UNHANDLED_ERROR = 3, |
There was a problem hiding this comment.
iirc there are some ethers error correctly handled some not, this is in the case it's an unknown error from ethers
| DOCUMENT_REVOKED = 1, | ||
| CONTRACT_ADDRESS_INVALID = 2, | ||
| ETHERS_UNHANDLED_ERROR = 3, | ||
| SKIPPED = 4, |
There was a problem hiding this comment.
Why is skipped in the revocation code?
There was a problem hiding this comment.
why not ? I dont understand ?
| }, | ||
| ]); | ||
| }); | ||
| it("should return a invalid fragment when revocation store is used and the document is not revoked", async () => { |
There was a problem hiding this comment.
| it("should return a invalid fragment when revocation store is used and the document is not revoked", async () => { | |
| it("should return a invalid fragment when revocation store is used and the document is revoked", async () => { |
| code: 1, | ||
| codeString: "DOCUMENT_REVOKED", | ||
| message: | ||
| "Certificate 0x856924fa2cf3374bf64697eb0dcf38d0251ff18aedae2bbc193398e8bb11fbd1 has been revoked under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", |
There was a problem hiding this comment.
| "Certificate 0x856924fa2cf3374bf64697eb0dcf38d0251ff18aedae2bbc193398e8bb11fbd1 has been revoked under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", | |
| "Document 0x856924fa2cf3374bf64697eb0dcf38d0251ff18aedae2bbc193398e8bb11fbd1 has been revoked under contract 0x8Fc57204c35fb9317D91285eF52D6b892EC08cD3", |
Can we change reference of certificate to document
| const type: VerificationFragmentType = "DOCUMENT_STATUS"; | ||
| export const openAttestationRevocationStore: Verifier<WrappedDocument<v2.OpenAttestationDocument>> = { | ||
| skip: () => { | ||
| return Promise.resolve({ |
There was a problem hiding this comment.
wont this resolve be redundant? or can just add async to the function
There was a problem hiding this comment.
could, just coding style :p (both are equivalent)
| test: (document) => { | ||
| if (utils.isWrappedV2Document(document)) { | ||
| const documentData = getData(document); | ||
| return documentData.issuers.every((issuer) => "revocationStore" in issuer); |
There was a problem hiding this comment.
Shouldnt this be any? Any failure should fail it?
There was a problem hiding this comment.
hum indeed used .some everywhere but for revoke 🤔
will change both 🙈
depends on Open-Attestation/open-attestation#108