async def check_hold_invoice(self, payment_hash: str, wallet: Abstract_Wallet = None) -> dict:
        """
        Checks the status of a lightning hold invoice 'payment_hash'.
        Possible states: unpaid, paid, settled, unknown (cancelled or not found)

        arg:str:payment_hash:Payment hash in hex of the hold invoice
        """
        assert len(payment_hash) == 64, f"Invalid payment_hash length: {len(payment_hash)} != 64"
        info: Optional['PaymentInfo'] = wallet.lnworker.get_payment_info(bfh(payment_hash))
        is_accepted_mpp: bool = wallet.lnworker.is_accepted_mpp(bfh(payment_hash))
        amount_sat = (wallet.lnworker.get_payment_mpp_amount_msat(bfh(payment_hash)) or 0) // 1000
        status = "unknown"
        if info is None:
            pass
        elif not is_accepted_mpp:
            status = "unpaid"
        elif is_accepted_mpp and payment_hash in wallet.lnworker.dont_settle_htlcs:
            status = "paid"
        elif (payment_hash in wallet.lnworker._preimages
                and payment_hash not in wallet.lnworker.dont_settle_htlcs
                and is_accepted_mpp):
            status = "settled"
        result = {
            "status": status,
            "amount_sat": amount_sat
        }
        return result

        Checks the status of a lightning hold invoice 'payment_hash'.
        Possible states: unpaid, paid, settled, unknown (cancelled or not found)

        arg:str:payment_hash:Payment hash in hex of the hold invoice
        
electrum/commands.py