>>34698814Both are grammatically correct because in modern English, the only thing needed to express a counterfactual situation is a past tense verb.
If I was you = I'm not you,
just as,
If I were you = I'm not you.
It works the same way with 'wish'.