Which could be revoked by printing new money with a new design and giving them only to the friendly parties in replacement of the old ones. It's routinely done (Euro is on its second design) and old banknotes and coins are no more valid after some years (the first series of Euros doesn't have an end of life yet.)
Yes, the design is routinely changed to make the currencies more safe against falsification. And the old currency is often taken out of circulation simply by wear and tear. But it is the sign of a stable economy that legal tender does not have an expiration date.
"Note that it is U.S. government policy that all designs of Federal Reserve notes remain legal tender, or legally valid for payments, regardless of when they were issued. This policy includes all denominations of Federal Reserve notes, from 1914 to present as per 31 U.S.C. § 5103."
https://www.uscurrency.gov/acceptance-and-use-older-design-f...
Shops aren't required to take the old local currencies anymore, but they can still be swapped.
Here for instances the information if the German Bundesbank, where you can still swap with the official rate of 1.95583 DM/€.
https://www.bundesbank.de/de/aufgaben/bargeld/dm-banknoten-u...
(Currently there is a restriction of in person service due to corona, but if you trust mail it works, else you have to wait for that Corona restriction to be lifted)
A notable anecdote is the Northern Bank robbery of 2004, when (presumably IRA) robbers stole 26 million UK pounds from the biggest Belfast branch of the Northern Bank, which, like other private banks in Northern Ireland and Scotland, issued its own banknotes. They held a manager's family at gunpoint during the action.
This total sum seemed to be far beyond the robbers' actual intentions, and the Northern Bank quickly issued a new banknote design, offering free exchanges for anyone with the old one.
Of course the robbed money had serial numbers, so it's now generally believed the IRA just burned most of the stolen cash.
Which would significantly devalue the currency because you'd hedge your bets against not becoming unfavourable to whichever regime controls its issuance.