Firstly, these codes are set when the fuel 'TRIMS' are out of spec (either tool LEAN - P1123, OR too RICH - P1128).
The air/fuel control system, in addition to a number of sensors, includes the following components and systems:
Intake air system.
Evaporative emissions control system (includes purge control solenoid valve).
Fuel pressure regulator.
For the air/fuel ratio to be within limits, all of the sensors, components and systems associated with the air/fuel control system must function within normal parameters.
STOP replacing parts/sensors unless you can VERIFY they are defective!
The Powertrain Control Module (PCM) on Hyundai OBD II vehicles (all 1996 and later models) can adjust the engine Air to Fuel (A/F) ratio to compensate for variations in operating conditions. This adjustment only takes place during "Closed Loop" operation.
The PCM uses input from the following components to determine the amount of fuel to deliver:
Air flow sensor
Coolant temperature sensor
Intake air temperature sensor
Throttle position sensor
Engine speed sensor
The ability to adjust the A/F ratio enables the PCM to compensate for engine, fuel and sensor variations as well as temperature, altitude and humidity. This enables the vehicle to maintain a stoichiometric (14.7 to 1) A/F ratio that will ensure optimal engine performance and minimal emissions.
Since the PCM can change the A/F ratio to compensate for a wide range of conditions, an indicator is needed to identify that a compensation has been made. Fuel Trim values shown on the HDS scan tool are the primary indicator that an adjustment in fuel delivery has taken place.
The scan tool displays the PCM's A/F ratio compensation as "Short Term" Fuel Trim (ST TRIM), Long Term Fuel Trim (LT TRIM), and "Oxygen Sensor" Trim (TRIM B1 S1 and B1 S2). The most beneficial diagnostic information comes from "Short Term" Fuel Trim and "Long Term" Fuel Trim.
AFTER ALL THIS, I think it's simply your Coolant Temperature Sensor giving 'FALSE' information to the engine control module/powertrain control module (ECM/PCM).