The house of the righteous is not of this world. The house of the righteous is part of the kingdom of Christ, which is in Heaven. (John 18:36). Yes; the house, the reward, the treasure, and the heart of the righteous is in heaven. This is a concept that was not fully grasped in the times before Christ came into the world, when Solomon amassed his worldly wealth and then wrote about the house of the righteous. Nevertheless, it is an integral part of the gospel message.
Much of the Old Testament is concerned with showing the futility of worldy and human attempts at fullfilment. As the saints of those times awaited God's Messiah, who alone can bring salvation and fulfillment, God showed that the Law, a body of religeous rules and regulations could not bring about the fulfillment of His plan; which is salvation and new, everlasting life for those who trust in Him. Likewise, the waging of physical war can not bring about the salvation and peace that God desires for His people. And in the same way, worldly wealth does not make the righteous prosper.
Job's frenemies judged and condemned him in the time of his deep hardship because they thought worldly wealth and health was a sign of righteousness. The Pharisees believed the same garbage. And that is why they also condemned and oppressed the poor. Luke tells us,
Then verse 16 really drives home this point concerning the Old Testament.
"The law and the prophets were until John. Since that time the kingdom of God has been preached, and everyone is pressing into it".
Now in the gospel, we have hope of true and etenal wealth, which is spiritual, not carnal. It is heavenly, not earthly. Everything that is carnal and earthly is corruptible and passing away. But we "were not redeemed with corruptible things, like silver or gold...but with the precious blood of Christ" (1 Peter 1:18-19). And we are reminded in Scripture,