The majority of the price hike happened in the supply chain and didn't flow through to nvidia. The demand itself was a benefit, of course (simply selling more), but nvidia's source pricing didn't change.
nvidia spoke out against mining because their concern was that gamers would move to the PS4 Pro, XboxX, etc, due to the shortage, which could hurt them in the long term.