you're lucky you didn't get electrocuted while putting out the fire with aquarium water since you did have a live wire on the floor sparking. In either case, good thing you were home to catch it. Another 5 minutes or so, you would have lost at least the room.
I'm putting together a tank right now and I'm starting to reinforce my wire routing and connections. We can never be too safe.