https://en.m.wikipedia.org/wiki/Corral%C3%B3n
This is surely a corrective measure for countries that have been long dependent on US dollar to run their country. Countries who have stood with their local fiat currency have not had it tough like those who depend on dollar so it is evident that such exchange is a wake up call to all those countries making use of the dollar for exchange and transaction.
If an economic is jettisoning their local currency then they are only causing their fiat to be depreciating in value while the dependent currency keep appreciating because before you transact or exchange in import or export you then need to convert first and moreover, investors and politicians would prefer to hodl and hord the foreign currency and causing it to be scarce and that will push it exchange for local currency higher.