From: Rabbi Moshe Sofer
To: Rabbi Mordechai Benet
When the Austrian Emperor invalidated the old Banco-Zettel banknotes, the Chasam Sofer distinguishes between Torah law — under which the borrower may repay with still-circulating (albeit devalued) old notes before the invalidation date, placing the loss on the lender — and dina d'malchusa, which requires the borrower to compensate for the full depreciation at the original exchange rate in all cases. He rules that dina d'malchusa governs such monetary matters and reports having ruled accordingly in practice, while noting that Rabbi Mordechai Benet apparently disagreed and inviting him to state his reasoning.
Source: Shu"t Chasam Sofer CM §64