In 3 Nephi 24, Jesus shares some of the words of the prophet Malachi and instructs the Nephites to include them in their records. He begins with the contents of Malachi 3, which includes the following statement from God:
"Bring ye all the tithes into the storehouse, that there may be meat in my house, and prove me now herewith, saith the Lord of hosts, if I will not open you the windows of heaven, and pour you out a blessing, that there shall not be room enough to receive it." (3 Nephi 24:10)
Perhaps you've heard part of the above quoted from time to time in prayers in which the Lord is asked to open the windows of heaven and pour out a blessing that we cannot contain. As you can see from reading the full text though, this verse offers the opportunity to open the windows of heaven specifically when tithes are brought into the storehouse of the Lord.
At first glance, it may sound like this verse is saying we have to buy our blessings — as if God is saying, "IF you give me money, THEN I'll open the windows of heaven to bless you." But that doesn't really make sense. After all, does God need money? Obviously not. (Who would He buy things from?) And, even if He did need money, He could just create it Himself (see Matthew 17:27).