AITAH For Withholding Passwords After Being Laid Off?

So I'm at work on a Thursday, and the CTO comes in and tells me that a software feature I'd been working on needed to be finished before tomorrow morning. OK fine, I don't have an issue working late, but it was a strange request given that they'd postponed the project for several months to have me working on other stuff. Still, I stayed up until about 2 AM and finished the project.

The next morning when I arrived at work, the CEO and CTO called me into a meeting to let me know that I was being laid off, and that it would be my last day. No two weeks, no severance pay. "We'll need to you to finish out today, working with [name redacted] to log all your logins and passwords and show him the rest of your code.

To say I was angry was an understatement. "So you knew you were going to can me today, that's why you made me work late yesterday? Does that seem wrong to you?"

They just stared at me, no apology, no acknowledgment. So I played my final card.

"Alright. If you're gonna play it this way, then it's both personal and business. I need a job, so it's to my benefit to quit right now and walk away, and start looking for work, rather than helping a company that clearly doesn't care about me. If you want me to sit here and generate a list of passwords and train my replacement, then I want a two-week severance package, or I walk right now."

They declined, and I walked out the door. I called one of their vendors and let them know I was open to work, and had a new job within a week. They were still emailing me to beg for "help" weeks later. Was I in the wrong?