In every action for possession of any real estate mortgaged, in which the defendant by his or her answer shall aver a right of redemption in himself or herself or in the person under whom the defendant claims, which averment shall not be denied by the plaintiff, or if denied shall be found true, the court shall, by itself or by one or more judicious and disinterested persons appointed by it, ascertain the just sum due on such mortgage; and shall thereupon render a conditional judgment, that if the mortgagor, the mortgagor's heirs, executors, administrators, or assigns, shall pay unto the plaintiff in such action, or deposit in the clerk's office for him or her, the sum adjudged due within two (2) months from the time of entering up judgment, with interest, then the mortgage, or deed operating as such, shall be void and discharged; otherwise the plaintiff shall have a judgment for possession.
R.I. Gen. Laws § 34-20-4