25-1-401. Deposit of money in lieu of undertaking. In all cases in which an undertaking or bond with sureties is required by the provisions of this code, the plaintiff or defendant may deposit with the clerk of the court, justice of the peace, or city judge, as appropriate, a sum of money equal to the amount required by the undertaking or bond, which must be taken as security in the place of the undertaking or bond. At any time, the deposit may be withdrawn by the party making it upon giving the undertaking with sufficient sureties as required by law, approved by the clerk, justice, or judge, upon notice to the adverse party or the adverse party's attorney, who may object to the sufficiency of the sureties in the same manner as though the undertaking were filed in the first instance.