This whole thing of imputed righteousness is a wrong headed notion and IMHO a very dangerous idea because it leads to moral complacency. Righteousness is when you aspire to keep God's commandments, when you love God and your neighbor as yourself. That's the only kind of righteousness that's real.
The LORD is full of gifts for Abraham and even without the Law Abraham is declared righteous because of his believing God.
Genesis15:1 After this, the word of the Lord came to Abram in a vision:
“Do not be afraid, Abram.
I am your shield,
your very great reward.”
2 But Abram said, “Sovereign Lord, what can you give me since I remain childless and the one who will inherit my estate is Eliezer of Damascus?” 3 And Abram said, “You have given me no children; so a servant in my household will be my heir.”
4 Then the word of the Lord came to him: “This man will not be your heir, but a son who is your own flesh and blood will be your heir.” 5 He took him outside and said, “Look up at the sky and count the stars—if indeed you can count them.” Then he said to him, “So shall your offspring be.”
6 Abram believed the Lord, and he credited it to him as righteousness.
7 He also said to him, “I am the Lord, who brought you out of Ur of the Chaldeans to give you this land to take possession of it.”
But of course complacency is possible even for those who are to keep the Law. Christians are warned about this and repentance is an important step in turning to Jesus.
Jeremiah 7:1 This is the word that came to Jeremiah from the Lord: 2 “Stand at the gate of the Lord’s house and there proclaim this message:“‘Hear the word of the Lord, all you people of Judah who come through these gates to worship the Lord. 3 This is what the Lord Almighty, the God of Israel, says: Reform your ways and your actions, and I will let you live in this place. 4 Do not trust in deceptive words and say, “This is the temple of the Lord, the temple of the Lord, the temple of the Lord!” 5 If you really change your ways and your actions and deal with each other justly, 6 if you do not oppress the foreigner, the fatherless or the widow and do not shed innocent blood in this place, and if you do not follow other gods to your own harm, 7 then I will let you live in this place, in the land I gave your ancestors for ever and ever. 8 But look, you are trusting in deceptive words that are worthless.
9 “‘Will you steal and murder, commit adultery and perjury, burn incense to Baal and follow other gods you have not known, 10 and then come and stand before me in this house, which bears my Name, and say, “We are safe”—safe to do all these detestable things? 11 Has this house, which bears my Name, become a den of robbers to you? But I have been watching! declares the Lord.
Christians should and are encouraged to keep God's Commandments in loving God and our neighbour, but without knowing our need for forgiveness and mercy there is danger in becoming proud,,,,,,,,,something God hates.