Nah he didn't, he easily deserved B.
If he was playing tests, he'd probably deserve A, he'd be a regular (and was one) in all three formats. In tests, in 2018 he averaged 19, in 2019 he averaged 24. Deserves his place in T20s. And while not great in ODIs, is still good enough to get into the side. If you're a player who gets in all 3 formats, you deserve A. It's not like he would have much competition, Sarfraz isn't excelling in any format yet is A, and Babar's the only other guy out of the 3 who plays all formats.
C is just punishing him from retiring from tests. It probably doesn't matter to him anyway, it'll be more lucrative and lengthen playing career just playing limited overs, than if he got category A and was playing tests.
I'm no Amir fan, and didn't really want him back after the fixing. But I don't like these "punishing" tactics. Make tests more attractive to play, you shouldn't have to force/punish people to play them. Amir on merit deserved the B contract. It's hard to argue he only deserved C performance based.