async def settle_hold_invoice(self, payment_hash: str, wallet: Abstract_Wallet = None) -> dict:
        """
        Settles lightning hold invoice 'payment_hash' using the stored preimage.
        Doesn't block until actual settlement of the HTLCs.

        arg:str:payment_hash:Hex encoded payment hash of the invoice to be settled
        """
        assert len(payment_hash) == 64, f"Invalid payment_hash length: {len(payment_hash)} != 64"
        assert payment_hash in wallet.lnworker._preimages, f"Couldn't find preimage for {payment_hash}"
        assert payment_hash in wallet.lnworker.dont_settle_htlcs, "Is already settled!"
        assert payment_hash in wallet.lnworker.payment_info, \
            f"Couldn't find lightning invoice for payment hash {payment_hash}"
        assert wallet.lnworker.is_accepted_mpp(bfh(payment_hash)), \
            f"MPP incomplete, cannot settle hold invoice {payment_hash} yet"
        del wallet.lnworker.dont_settle_htlcs[payment_hash]
        util.trigger_callback('wallet_updated', wallet)
        result = {
            "settled": payment_hash
        }
        return result

        Settles lightning hold invoice 'payment_hash' using the stored preimage.
        Doesn't block until actual settlement of the HTLCs.

        arg:str:payment_hash:Hex encoded payment hash of the invoice to be settled
        
electrum/commands.py