From 5b6d4dc3260362e757246db4ec5ba0a67b5b8764 Mon Sep 17 00:00:00 2001 From: Richard Treier Date: Fri, 7 Jul 2023 09:08:24 +0200 Subject: [PATCH 1/2] fix: data address built wrongly --- src/app/core/services/data-address-mapper.ts | 3 ++- src/app/core/services/http-params-mapper.service.ts | 5 +++-- .../asset-create-dialog/asset-create-dialog.component.html | 2 +- .../contract-agreement-transfer-dialog.component.html | 2 +- .../contract-agreement-transfer-dialog.component.ts | 6 +++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/core/services/data-address-mapper.ts b/src/app/core/services/data-address-mapper.ts index 9e097d12e..b32bbbabb 100644 --- a/src/app/core/services/data-address-mapper.ts +++ b/src/app/core/services/data-address-mapper.ts @@ -1,6 +1,7 @@ import {Injectable} from '@angular/core'; import {AssetDatasourceFormValue} from '../../routes/connector-ui/asset-page/asset-create-dialog/model/asset-datasource-form-model'; import {ContractAgreementTransferDialogFormValue} from '../../routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog-form-model'; +import {DataAddressDto} from './api/legacy-managent-api-client'; import {HttpRequestParamsMapper} from './http-params-mapper.service'; @Injectable({providedIn: 'root'}) @@ -12,7 +13,7 @@ export class DataAddressMapper { | AssetDatasourceFormValue | ContractAgreementTransferDialogFormValue | undefined, - ): Record { + ): DataAddressDto { switch (formValue?.dataAddressType) { case 'Custom-Data-Address-Json': return JSON.parse(formValue.dataDestination?.trim()!!); diff --git a/src/app/core/services/http-params-mapper.service.ts b/src/app/core/services/http-params-mapper.service.ts index e5da398ec..9badf5594 100644 --- a/src/app/core/services/http-params-mapper.service.ts +++ b/src/app/core/services/http-params-mapper.service.ts @@ -5,6 +5,7 @@ import {HttpDatasourceQueryParamFormValue} from '../../routes/connector-ui/asset import {ContractAgreementTransferDialogFormValue} from '../../routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog-form-model'; import {removeNullValues} from '../utils/record-utils'; import {everythingAfter, everythingBefore} from '../utils/string-utils'; +import {DataAddressDto} from './api/legacy-managent-api-client'; import {Asset} from './models/asset'; import {HttpRequestParams} from './models/http-request-params'; @@ -15,9 +16,9 @@ export class HttpRequestParamsMapper { | AssetDatasourceFormValue | ContractAgreementTransferDialogFormValue | undefined, - ): Record { + ): DataAddressDto { const params = this.buildHttpRequestParams(formValue); - return this.encodeHttpRequestParams(params); + return {properties: this.encodeHttpRequestParams(params)}; } encodeHttpProxyTransferRequestProperties( diff --git a/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html b/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html index 2c940c4e9..449635352 100644 --- a/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html +++ b/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html @@ -190,7 +190,7 @@

Create New Asset

Custom Datasource Config (JSON) {{ validationMessages.invalidJsonMessage }} diff --git a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html index 07ca81869..5e84887e4 100644 --- a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html +++ b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html @@ -23,7 +23,7 @@

Initiate Transfer

Custom Datasink Config (JSON) {{ validationMessages.invalidJsonMessage }} diff --git a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts index e7344899f..3c615aa4a 100644 --- a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts +++ b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts @@ -114,15 +114,15 @@ export class ContractAgreementTransferDialogComponent implements OnDestroy { value, ); - let dataAddressProperties = - this.dataAddressMapper.buildDataAddressProperties(value); + let dataSinkProperties = + this.dataAddressMapper.buildDataAddressProperties(value).properties ?? {}; return { type: 'PARAMS_ONLY', params: { contractAgreementId: this.data.contractId, properties: transferRequestProperties, - dataSinkProperties: dataAddressProperties, + dataSinkProperties, }, }; } From bcedb30c7fe8e2648382775a2092c7483690631d Mon Sep 17 00:00:00 2001 From: Richard Treier Date: Fri, 7 Jul 2023 09:11:03 +0200 Subject: [PATCH 2/2] chore: prepare release --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3290769ae..912b9110c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,18 @@ the detailed section referring to by linking pull requests or issues. #### Fixed +## [v0.0.1-milestone-8-sovity10] 07.07.2023 + +### Overview + +Bugfix Release + +### Detailed Changes + +#### Fixed + +- Fixed a bug causing data address dtos to be built wrongly. + ## [v0.0.1-milestone-8-sovity9] 04.07.2023 ### Overview