If he says, “Become betrothed to me on condition that I am a righteous person,” she is mekudeshes even if he is completely wicked, because perhaps he intends to repent.
The Beis Yosef writes in the name of Rabbeinu Yeruchem that if he is a rasha due to sins committed between his fellow man, such as a thief, he cannot be considered righteous until he returns the stolen object. And so it would be by all such sins; if he wounded his fellow man, he cannot be regarded as a Tzadik until he compensates the injured party.
However, some say that as long as he has resolved to make amends, he is considered a righteous person.
The sefer Shai Lemoreh asks: The Gemora in Bava Kamma states that if a person stole money and he decided that he will return it, but before he had the opportunity to return it, he died, he is not regarded as a wicked person. Yet we find that Yom Kippur does not atone for sins between a man and his fellow until one asks forgiveness from the one that he offended. It emerges that even though he already repented, Yom Kippur will not atone for those sins!?
He answers that by Yom Kippur, it is different. Since the injured party is still alive, he still has the opportunity to ask him for forgiveness. So long as he does not take advantage of that opportunity, he will not be forgiven. However, one who steals and later intended to return that which he stole, but he died beforehand, he is not regarded as a rasha, for now, he does have the availability to make amends.