Ensure start transaction payload is always compliant with OCA specs
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20RequestService.ts
index eddbcf8da142d243c3c28910ea10b798a25359e4..ccacc0fa541a06efba86a58f763229297623e837 100644 (file)
@@ -64,15 +64,10 @@ export default class OCPP20RequestService extends OCPPRequestService {
     params?: RequestParams
   ): Promise<ResponseType> {
     if (OCPP20ServiceUtils.isRequestCommandSupported(chargingStation, commandName) === true) {
-      const requestPayload = this.buildRequestPayload<RequestType>(
-        chargingStation,
-        commandName,
-        commandParams
-      );
       return (await this.sendMessage(
         chargingStation,
         Utils.generateUUID(),
-        requestPayload,
+        this.buildRequestPayload<RequestType>(chargingStation, commandName, commandParams),
         commandName,
         params
       )) as unknown as ResponseType;