Many people have found that phones work normally after exposure to moisture, once they have been thoroughly dried out.
Open your phone, take the battery out, and put the open phone in a dry, warm place for at least 24 hours - an airing cupboard is ideal. With luck you'll find that all is well when you replace the battery - it depends on how much water got inside.
I once dropped a phone in a toilet. It worked normally after a thorough drying out.