The correct way to write sentence 2 is:
C. When she had volunteered to help Grandma clean out her attic, she had hoped there would be something wonderful hidden in its dusty corners.
This option is grammatically correct and clearly conveys the intended meaning.