"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attachIso20022ToLeaves = attachIso20022ToLeaves;
const checkpoint_core_1 = require("@dbis/checkpoint-core");
function attachIso20022ToLeaves(leaves) {
    if (process.env.CHECKPOINT_ISO_ENRICH === '0')
        return;
    for (const leaf of leaves) {
        if (!leaf.iso20022)
            leaf.iso20022 = (0, checkpoint_core_1.mapPaymentLeafToCanonical)(leaf);
    }
}
