}
public static getHashId(index: number, stationTemplate: ChargingStationTemplate): string {
- const hashBootNotificationRequest = {
+ const chargingStationInfo = {
chargePointModel: stationTemplate.chargePointModel,
chargePointVendor: stationTemplate.chargePointVendor,
...(!Utils.isUndefined(stationTemplate.chargeBoxSerialNumberPrefix) && {
return crypto
.createHash(Constants.DEFAULT_HASH_ALGORITHM)
.update(
- JSON.stringify(hashBootNotificationRequest) +
+ JSON.stringify(chargingStationInfo) +
ChargingStationUtils.getChargingStationId(index, stationTemplate)
)
.digest('hex');
public static createSerialNumber(
stationTemplate: ChargingStationTemplate,
- stationInfo: ChargingStationInfo = {} as ChargingStationInfo,
+ stationInfo: ChargingStationInfo,
params: {
randomSerialNumberUpperCase?: boolean;
randomSerialNumber?: boolean;
public static propagateSerialNumber(
stationTemplate: ChargingStationTemplate,
stationInfoSrc: ChargingStationInfo,
- stationInfoDst: ChargingStationInfo = {} as ChargingStationInfo
+ stationInfoDst: ChargingStationInfo
) {
if (!stationInfoSrc || !stationTemplate) {
throw new BaseError(