At any sale of real or personal property upon which there is a mortgage, pledge or other lien, the holder of the lien may become the purchaser, and may apply the amount of his lien on the purchase price. If no claim thereon has been filed or allowed, the court, at the hearing on the report of sale and for confirmation of the sale, may examine into the validity and enforceability of the lien or charge and the amount due thereunder and secured thereby, and may authorize the personal representative to accept the receipt of the purchaser for the amount due thereunder and secured thereby as payment pro tanto. If the mortgage, pledge or other lien is a valid claim against the estate and has been allowed, the receipt of the purchaser for the amount due him from the proceeds of the sale is a payment pro tanto. If the amount for which the property is purchased, whether or not a claim for it has been filed or allowed, is insufficient to defray the expenses and discharge his mortgage, pledge or other lien, the purchaser shall pay an amount sufficient to pay the balance of the expenses. Nothing permitted under this section shall be deemed to be an allowance of a claim based upon such mortgage, pledge or other lien.
W.S. 2-7-618