Skip to content

Commit

Permalink
fix: pr review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
HJunyuan committed Sep 4, 2023
1 parent ac2cae9 commit 1b9327a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
13 changes: 13 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branches": [
"master",
{
"name": "alpha",
"prerelease": true
},
{
"name": "beta",
"prerelease": true
}
]
}
13 changes: 0 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,5 @@
"commitizen": {
"path": "node_modules/@commitlint/prompt"
}
},
"release": {
"branches": [
"master",
{
"name": "alpha",
"prerelease": true
},
{
"name": "beta",
"prerelease": true
}
]
}
}
5 changes: 0 additions & 5 deletions src/shared/@types/wrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,3 @@ export interface WrapDocumentOptionV3 {
export interface WrapDocumentOptionV4 {
// If any, add options to wrap utility
}

// TODO: Does not seem to be utilised - to remove?
export const isWrapDocumentOptionV3 = (options: any): options is WrapDocumentOptionV3 => {
return options?.version === SchemaId.v3;
};
4 changes: 2 additions & 2 deletions src/shared/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const getMerkleRoot = (document: any): string => {
else if (isWrappedV4Document(document)) return document.proof.merkleRoot;

throw new Error(
"Unsupported document type: Only can retrieve merkle root from wrapped OpenAttestation v2 & v3 documents."
"Unsupported document type: Only can retrieve merkle root from wrapped OpenAttestation v2, v3 & v4 documents."
);
};

Expand All @@ -116,7 +116,7 @@ export const getTargetHash = (document: any): string => {
else if (isWrappedV4Document(document)) return document.proof.targetHash;

throw new Error(
"Unsupported document type: Only can retrieve target hash from wrapped OpenAttestation v2 & v3 documents."
"Unsupported document type: Only can retrieve target hash from wrapped OpenAttestation v2, v3 & v4 documents."
);
};

Expand Down

0 comments on commit 1b9327a

Please sign in to comment.