[PLAT-4817] Extracting out swap leg conversion into a utility class