@@ -130,8 +130,8 @@ export const EServiceCreateStepThresholds: React.FC<ActiveStepProps> = () => {
130130
131131 const newDescriptorData : ProducerEServiceDescriptor = {
132132 ...descriptor ,
133- dailyCallsPerConsumer : values . dailyCallsPerConsumer ,
134- dailyCallsTotal : values . dailyCallsTotal ,
133+ dailyCallsPerConsumer : values . dailyCallsPerConsumer ?? 1 ,
134+ dailyCallsTotal : values . dailyCallsTotal ?? 1 ,
135135 attributes,
136136 }
137137
@@ -141,22 +141,23 @@ export const EServiceCreateStepThresholds: React.FC<ActiveStepProps> = () => {
141141 return
142142 }
143143
144- // TODO: Update the eservide
145- //
146- // const payload: UpdateEServiceDescriptorSeed & {
147- // eserviceId: string
148- // descriptorId: string
149- // } = {
150- // dailyCallsPerConsumer: descriptor.dailyCallsPerConsumer,
151- // dailyCallsTotal: descriptor.dailyCallsTotal,
152- // agreementApprovalPolicy: descriptor.agreementApprovalPolicy,
153- // description: descriptor.description,
154- // attributes: remapDescriptorAttributesToDescriptorAttributesSeed(attributes),
155- // eserviceId: descriptor.eservice.id,
156- // descriptorId: descriptor.id,
157- // }
158- //
159- // updateVersionDraft(payload, { onSuccess: forward })
144+ // TODO: Check if it is correct to default some fields
145+ const payload : UpdateEServiceDescriptorSeed & {
146+ eserviceId : string
147+ descriptorId : string
148+ } = {
149+ audience : [ ] ,
150+ voucherLifespan : 0 ,
151+ dailyCallsPerConsumer : descriptor . dailyCallsPerConsumer ,
152+ dailyCallsTotal : descriptor . dailyCallsTotal ,
153+ agreementApprovalPolicy : descriptor . agreementApprovalPolicy ,
154+ description : descriptor . description ,
155+ attributes : remapDescriptorAttributesToDescriptorAttributesSeed ( attributes ) ,
156+ eserviceId : descriptor . eservice . id ,
157+ descriptorId : descriptor . id ,
158+ }
159+
160+ updateVersionDraft ( payload , { onSuccess : forward } )
160161 }
161162
162163 return (
0 commit comments