TLDR ltr got catcalled, have i reacted right?

We were just walking down the street and 2 homeless guys were just sitting on a bench drinking and smoking. I could see that one of them is going to say something, he tried to greet us, but I didnt answer and just stared him in the eye. We passed them and this guy said something along the lines: man, jeans are quite tight nowadays, while staring at her ass. I was looking into his eyes this whole time, but as he said these I stopped. (Old beta me would just ignore it and continue walking) This fuckin pissed me off. So I stopped still staring at his eyes. He then stood up and came next to me, sticking out his hands, for a handshake.(ofc i didnt touch him) Then he asked can you please help me? I said no. By this time his fucking 20cm (like 8 inches) tall dog came furiously barking at us. I didnt want to kick the dog or hit the guy, so I turned away and started walking. That was it.

Later my ltr told his friend how pissed I got and almost hit the guy. I think this is a good sign but man.

I was fucking dumb. What if this shithead had a knife?? He got nothing to lose but we quite a lot. My thoughts are racing about this. What else should I have done ???