Accidentally put weight on leg without boot while NWB. Panicking.

As the title says, I had taken off my boot and the compression bandage to put scar cream and the bell rang and I accidentally half stood up to get it before the hurt and the wobbliness shocked me into realizing what I'd done. I am in pain (though bearable) and there's some swelling around the ankle now. I am terrified that I've done irrevocable harm. I am about three weeks out from the surgery. Please tell me this is fine.