Whenever federal assistance to this state for joint public assistance for any period of welfare emergency during which sums appropriated by Section 18002 have been expended is received by this state, any sums appropriated by Section 18002, which have theretofore been expended for joint public assistance pursuant to this chapter, shall be repaid to the state from the funds so received, and deposited in the General Fund in the State Treasury to the credit of the appropriation made by Section 18002.