Nigeria had prepared for widespread protests over the rising cost of living amid soaring inflation and a devalued currency.