How they pay you doesn't change the visa issues. However, working for a non-US entity does not seem to violate your F-1 visa restrictions (even if you do so while present in the US). I'd make sure that the Candian company has no US nexus that would make it seem like you are working for an unapproved US company.