Skip to content

Commit

Permalink
Merge pull request #406 from docknetwork/fix/schema-load-limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
cykoder authored Mar 14, 2024
2 parents 0ca6252 + 4839c31 commit 3bdf631
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/sdk",
"version": "7.6.0",
"version": "7.7.0",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
10 changes: 5 additions & 5 deletions src/utils/vc/crypto/common/DockCryptoSignature.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ export default withExtendedStaticProperties(
*/
// eslint-disable-next-line no-inner-declarations
async function getSchema(schemaId) {
if (!schemaId.startsWith('blob:dock:')) {
throw new Error(`Can only fetch schemas stored on Dock for now. Got schema id ${schemaId}`);
}
const { document: schema } = await documentLoader(schemaId);
// schema[0] is the schema/blob id
return schema[1];
// schema[0] is the schema/blob id if stored on chain
if (schemaId.startsWith('blob:dock:')) {
return schema[1];
}
return schema;
}

// If we already have a schema to use, add that first and then generate relaxed values later on
Expand Down

0 comments on commit 3bdf631

Please sign in to comment.