"See, I [set before you] etc., the blessing etc." [Deuteronomy 11:26]. It was spoken in order: "If you walk in My statutes" [Leviticus 26:3] corresponds to "that you shall hearken to the commandments of the Lord your God." And the curses that were stated there shall come upon you "if you do not hearken to the commandments of the Lord your God, and you go after other gods" [cf. Deuteronomy 11:28] — for those curses were not stated except concerning a generation of idolaters.
The Blessing, the Curse, and the Generation of Idolaters
Midrash Aggadah, Deuteronomy 11:26
ראה אנכי וגו' את הברכה וגו'. אמרה כסדר אם בחקותי תלכו אשר תשמעון אל מצות ה' אלהיכם. והקללות שנאמרו לשם יבואו עליכם אם לא תשמעו אל מצות ה' אלהיכם, ותלכו אחרי אלהים אחרים, שאותן הקללות לא נאמרו אלא על דור עובדי עבודה זרה: