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); } }); 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": [