From 69b2b15856c63c1d48137288167de6c1006c8fb4 Mon Sep 17 00:00:00 2001 From: Marina Fedyantceva Date: Mon, 18 Nov 2024 15:41:43 +0300 Subject: [PATCH 1/2] [SPT-737] fixed creating model --- packages/core/src/BaseServiceClient.js | 29 +++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/packages/core/src/BaseServiceClient.js b/packages/core/src/BaseServiceClient.js index 7abd834..2db02ab 100644 --- a/packages/core/src/BaseServiceClient.js +++ b/packages/core/src/BaseServiceClient.js @@ -207,24 +207,23 @@ class BaseServiceClient { return new Promise((resolve, reject) => { this._modelServiceClient.create_model(request, (err, response) => { logger.debug(`create model ${err} ${response}`); - const modelDetails = response.getModelDetails(); - - const data = { - modelId: modelDetails.getModelId(), - methodName: modelDetails.getGrpcMethodName(), - serviceName: modelDetails.getGrpcServiceName(), - description: modelDetails.getDescription(), - status: modelDetails.getStatus(), - updatedDate: modelDetails.getUpdatedDate(), - addressList: modelDetails.getAddressListList(), - modelName: modelDetails.getModelName(), - publicAccess: modelDetails.getIsPubliclyAccessible(), - dataLink: modelDetails.getTrainingDataLink(), - }; - if (err) { reject(err); } else { + const modelDetails = response.getModelDetails(); + + const data = { + modelId: modelDetails.getModelId(), + methodName: modelDetails.getGrpcMethodName(), + serviceName: modelDetails.getGrpcServiceName(), + description: modelDetails.getDescription(), + status: modelDetails.getStatus(), + updatedDate: modelDetails.getUpdatedDate(), + addressList: modelDetails.getAddressListList(), + modelName: modelDetails.getModelName(), + publicAccess: modelDetails.getIsPubliclyAccessible(), + dataLink: modelDetails.getTrainingDataLink(), + }; resolve(data); } }); From 9607787883aeecf6b2cbc5fe791c337e25907aeb Mon Sep 17 00:00:00 2001 From: Nikolay Terekhin Date: Mon, 18 Nov 2024 15:44:18 +0300 Subject: [PATCH 2/2] snet-sdk-web version 4.0.3 --- packages/web/package-lock.json | 4 ++-- packages/web/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web/package-lock.json b/packages/web/package-lock.json index 8198bb1..2bfc5db 100644 --- a/packages/web/package-lock.json +++ b/packages/web/package-lock.json @@ -1,12 +1,12 @@ { "name": "snet-sdk-web", - "version": "4.0.2", + "version": "4.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "snet-sdk-web", - "version": "4.0.2", + "version": "4.0.3", "license": "MIT", "dependencies": { "@ethereumjs/tx": "^5.2.1", diff --git a/packages/web/package.json b/packages/web/package.json index b082e2c..3f2bc0b 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "snet-sdk-web", - "version": "4.0.2", + "version": "4.0.3", "description": "SingularityNET SDK for Web", "main": "./dist/index.js", "files": [