Where a buyer of real property gives to the seller a written contract for payment of all or part of the price, an absolute transfer of such contract by the seller waives his lien to the extent of the sum payable under the contract, but a transfer of such contract in trust to pay debts, and return the surplus, is not a waiver of the lien.
Ca. Civ. Code § 3047