Skip to content

Commit

Permalink
Hotfix/2.6.1 (#1469)
Browse files Browse the repository at this point in the history
* #1465

* set version 2.6.1

Signed-off-by: Stepan Kiryakov <[email protected]>

Signed-off-by: Stepan Kiryakov <[email protected]>
Co-authored-by: Stepan Kiryakov <[email protected]>
  • Loading branch information
Stepan-Kirjakov and Stepan-Kirjakov authored Nov 1, 2022
1 parent 9d31ba7 commit 69e0494
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 54 deletions.
2 changes: 1 addition & 1 deletion api-docs/api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: "Guardian"
description: "The Guardian is a modular open-source solution that includes best-in-class identity management and decentralized ledger technology (DLT) libraries. At the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation."
version: "2.6.0"
version: "2.6.1"
contact:
name: "API developer"
url: "https://envisionblockchain.com"
Expand Down
2 changes: 1 addition & 1 deletion api-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-docs",
"version": "2.6.0",
"version": "2.6.1",
"description": "Swagger Documentation",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@types/express-fileupload": "^1.4.1",
"dotenv": "^16.0.0",
"express": "^4.17.1",
Expand Down Expand Up @@ -51,5 +51,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.6.0"
"version": "2.6.1"
}
6 changes: 3 additions & 3 deletions auth-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@mikro-orm/core": "^5.3.0",
"@mikro-orm/mongodb": "^5.3.0",
"dotenv": "^16.0.0",
Expand Down Expand Up @@ -46,5 +46,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.6.0"
"version": "2.6.1"
}
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/interfaces": "^2.6.0",
"@guardian/interfaces": "^2.6.1",
"@mikro-orm/core": "^5.3.0",
"@mikro-orm/migrations-mongodb": "^5.3.1",
"@mikro-orm/mongodb": "^5.3.0",
Expand Down Expand Up @@ -34,5 +34,5 @@
"prepare": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.6.0"
"version": "2.6.1"
}
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
"test": "ng test",
"watch": "ng build --watch --configuration development --output-path ../www-data"
},
"version": "2.6.0"
"version": "2.6.1"
}
6 changes: 3 additions & 3 deletions guardian-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@hashgraph/sdk": "^2.18.3",
"@mikro-orm/core": "^5.3.0",
"@mikro-orm/mongodb": "^5.3.0",
Expand Down Expand Up @@ -74,5 +74,5 @@
"test:local": "mocha tests/**/*.test.js",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.6.0"
"version": "2.6.1"
}
31 changes: 23 additions & 8 deletions guardian-service/src/policy-engine/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,13 @@ export class PolicyUtils {
const adminKey = token.adminKey;

if (token.tokenType === 'non-fungible') {
const metaData = new Uint8Array(Buffer.from(uuid));
const data = new Array<Uint8Array>(Math.floor(tokenValue));
data.fill(metaData);
const data = new Array<string>(Math.floor(tokenValue));
data.fill(uuid);
const serials: number[] = [];
const dataChunk = PolicyUtils.splitChunk(data, 10);
const mintPromiseArray: Promise<any>[] = [];
for (let i = 0; i < dataChunk.length; i++) {
const element = dataChunk[i];
const metaData = dataChunk[i];
if (i % 100 === 0) {
ref.log(`Mint(${mintId}): Minting (Chunk: ${i + 1}/${dataChunk.length})`);
}
Expand All @@ -277,7 +276,10 @@ export class PolicyUtils {
hederaAccountId: root.hederaAccountId,
hederaAccountKey: root.hederaAccountKey,
dryRun: ref.dryRun,
tokenId, supplyKey, element, transactionMemo
tokenId,
supplyKey,
metaData,
transactionMemo
}
}, 1));

Expand Down Expand Up @@ -308,7 +310,12 @@ export class PolicyUtils {
hederaAccountId: root.hederaAccountId,
hederaAccountKey: root.hederaAccountKey,
dryRun: ref.dryRun,
tokenId, targetAccount, adminId, adminKey, element, transactionMemo
tokenId,
targetAccount,
adminId,
adminKey,
element,
transactionMemo
}
}, 1));

Expand All @@ -326,7 +333,10 @@ export class PolicyUtils {
hederaAccountId: root.hederaAccountId,
hederaAccountKey: root.hederaAccountKey,
dryRun: ref.dryRun,
tokenId, supplyKey, tokenValue, transactionMemo
tokenId,
supplyKey,
tokenValue,
transactionMemo
}
}, 1);
await workers.addTask({
Expand All @@ -335,7 +345,12 @@ export class PolicyUtils {
hederaAccountId: root.hederaAccountId,
hederaAccountKey: root.hederaAccountKey,
dryRun: ref.dryRun,
tokenId, targetAccount, adminId, adminKey, tokenValue, transactionMemo
tokenId,
targetAccount,
adminId,
adminKey,
tokenValue,
transactionMemo
}
}, 1);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"lint": "tslint --config ../tslint.json --project .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.6.0"
"version": "2.6.1"
}
6 changes: 3 additions & 3 deletions ipfs-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@web-std/fetch": "3.0.0",
"axios": "^0.26.1",
"axios-retry": "^3.2.4",
Expand Down Expand Up @@ -44,5 +44,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ipfs-client.xml",
"watch": "nodemon src/index.ts"
},
"version": "2.6.0"
"version": "2.6.1"
}
6 changes: 3 additions & 3 deletions logger-service/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@mikro-orm/core": "^5.3.0",
"@mikro-orm/mongodb": "^5.3.0",
"@web-std/fetch": "3.0.0",
Expand Down Expand Up @@ -36,5 +36,5 @@
"start": "node dist/index.js",
"watch": "nodemon src/index.ts"
},
"version": "2.6.0"
"version": "2.6.1"
}
4 changes: 2 additions & 2 deletions mrv-sender/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/common": "^2.6.1",
"@transmute/credentials-context": "0.7.0-unstable.40",
"@transmute/did-context": "0.7.0-unstable.40",
"@transmute/ed25519-signature-2018": "0.7.0-unstable.40",
Expand Down Expand Up @@ -29,5 +29,5 @@
"dev:docker": "nodemon .",
"start": "node dist/index.js"
},
"version": "2.6.0"
"version": "2.6.1"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"mrv-sender",
"worker-service"
],
"version": "2.6.0"
"version": "2.6.1"
}
2 changes: 1 addition & 1 deletion topic-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"dev": "tsc -w",
"start": "node dist/index.js"
},
"version": "2.6.0"
"version": "2.6.1"
}
6 changes: 3 additions & 3 deletions worker-service/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.6.0",
"@guardian/interfaces": "^2.6.0",
"@guardian/common": "^2.6.1",
"@guardian/interfaces": "^2.6.1",
"@hashgraph/sdk": "^2.18.3",
"@transmute/credentials-context": "^0.7.0-unstable.60",
"@transmute/did-context": "^0.7.0-unstable.60",
Expand Down Expand Up @@ -46,5 +46,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/worker-service.xml --exit"
},
"version": "2.6.0"
"version": "2.6.1"
}
13 changes: 11 additions & 2 deletions worker-service/src/api/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,18 @@ export class Worker {
}

case WorkerTaskType.MINT_NFT: {
const { hederaAccountId, hederaAccountKey, dryRun, tokenId, supplyKey, element, transactionMemo } = task.data;
const { hederaAccountId, hederaAccountKey, dryRun, tokenId, supplyKey, metaData, transactionMemo } = task.data;
const client = new HederaSDKHelper(hederaAccountId, hederaAccountKey, dryRun);
result.data = await client.mintNFT(tokenId, supplyKey, element, transactionMemo);
let data: Uint8Array[];
if (Array.isArray(metaData)) {
data = new Array<Uint8Array>(metaData.length);
for (let i = 0; i < metaData.length; i++) {
data[i] = new Uint8Array(Buffer.from(metaData[i]));
}
} else {
data = [new Uint8Array(Buffer.from(metaData))];
}
result.data = await client.mintNFT(tokenId, supplyKey, data, transactionMemo);
break;
}

Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ __metadata:
languageName: node
linkType: hard

"@guardian/common@^2.6.0, @guardian/common@workspace:common":
"@guardian/common@^2.6.1, @guardian/common@workspace:common":
version: 0.0.0-use.local
resolution: "@guardian/common@workspace:common"
dependencies:
"@guardian/interfaces": ^2.6.0
"@guardian/interfaces": ^2.6.1
"@mikro-orm/core": ^5.3.0
"@mikro-orm/migrations-mongodb": ^5.3.1
"@mikro-orm/mongodb": ^5.3.0
Expand All @@ -209,7 +209,7 @@ __metadata:
languageName: unknown
linkType: soft

"@guardian/interfaces@^2.6.0, @guardian/interfaces@workspace:interfaces":
"@guardian/interfaces@^2.6.1, @guardian/interfaces@workspace:interfaces":
version: 0.0.0-use.local
resolution: "@guardian/interfaces@workspace:interfaces"
dependencies:
Expand Down Expand Up @@ -1834,8 +1834,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "api-gateway@workspace:api-gateway"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@types/express": ^4.17.13
"@types/express-fileupload": ^1.4.1
"@types/jszip": ^3.4.1
Expand Down Expand Up @@ -2015,8 +2015,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "auth-service@workspace:auth-service"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@mikro-orm/core": ^5.3.0
"@mikro-orm/mongodb": ^5.3.0
"@types/jsonwebtoken": ^8.5.4
Expand Down Expand Up @@ -4389,8 +4389,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "guardian-service@workspace:guardian-service"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@hashgraph/sdk": ^2.18.3
"@mikro-orm/core": ^5.3.0
"@mikro-orm/mongodb": ^5.3.0
Expand Down Expand Up @@ -4960,8 +4960,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "ipfs-client@workspace:ipfs-client"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@types/fs-extra": ^9.0.12
"@types/js-yaml": ^4.0.3
"@types/node": ^17.0.13
Expand Down Expand Up @@ -6141,8 +6141,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "logger-service@workspace:logger-service"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@mikro-orm/core": ^5.3.0
"@mikro-orm/mongodb": ^5.3.0
"@types/fs-extra": ^9.0.12
Expand Down Expand Up @@ -6706,7 +6706,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "mrv-sender@workspace:mrv-sender"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/common": ^2.6.1
"@transmute/credentials-context": 0.7.0-unstable.40
"@transmute/did-context": 0.7.0-unstable.40
"@transmute/ed25519-signature-2018": 0.7.0-unstable.40
Expand Down Expand Up @@ -9744,8 +9744,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "worker-service@workspace:worker-service"
dependencies:
"@guardian/common": ^2.6.0
"@guardian/interfaces": ^2.6.0
"@guardian/common": ^2.6.1
"@guardian/interfaces": ^2.6.1
"@hashgraph/sdk": ^2.18.3
"@transmute/credentials-context": ^0.7.0-unstable.60
"@transmute/did-context": ^0.7.0-unstable.60
Expand Down

0 comments on commit 69e0494

Please sign in to comment.