Let’s say the seller decides to walk away from the deal after an earnest money deposit has been placed. In this case, all money would be refunded to the buyer.
However, like said earlier, if you as a buyer walk away for reasons not listed on the contract, your money will not be refunded.