Based on the appraisal, and if undue hardship to the servicemember’s dependents will not result, the court may order that the amount of the servicemember’s equity in the property be paid to the servicemember, or the servicemember’s dependents, as a condition of foreclosing the mortgage, repossessing the property, or rescinding or terminating the contract.