Catalyzes the dehydration of the S-form of NAD(P)HX at the expense of ADP, which is converted to AMP. Together with NAD(P)HX epimerase, which catalyzes the epimerization of the S- and R-forms, the enzyme allows the repair of both epimers of NAD(P)HX, a damaged form of NAD(P)H that is a result of enzymatic or heat-dependent hydration. (6S)-NADHX + ADP = AMP + H(+) + NADH + phosphate (6S)-NADPHX + ADP = AMP + H(+) + NADPH + phosphate Homotetramer. Belongs to the NnrD/CARKD family. Truncated N-terminus.