The greatest treasure that God has given to us is our heart, and the same heart we have is very deceitful, hence the need to always guard it diligently. If we allow filthiness in our heart or have unresolved issues in our heart or refuse to let go of bitterness or offense, God will not let His heart to be connected to our heart. God is looking for a heart, just like David's, whose heart loves Him unreservedly. The Bible in 2 Chronicles 16:9 states, "The eye of the Lord is looking to and fro throughout the whole earth, to shew Himself strong to those whose heart is perfect towards Him." And in our relationship with God, He vets our heart motives until He sees Himself in our heart, to entrust us with limitless kingdom possibilities.
This is exactly what happened to Hannah in the book of 1 Samuel 1. Hannah wanted a child so that she could stop the mockery of Peninnah, but it didn't happen until her motive of having a child changed from stopping the mockery of Peninnah to having a prophet for the Lord. We have to have a heart that is all about God. Then, God was committed to giving her a child. If we can give God our whole heart, there is nothing that God cannot give to us. He is a God of knowledge, and by Him, actions are weighed. 1 Samuel 2:3. God will check our heart before He can allow virtue to flow from Him to us.
God does not look as man looks. He checks our heart before He can either use or bless us. In fact, God is not looking for perfect people, but those with a good and pure heart, those who will help stand with, build and encourage others when they fall. Men and women whose hearts are connected to His and His eternal purposes. This is a heart that will not disappoint or bring reproach to God.