def get_pending_swaps(self) -> List[SwapData]:
        """Returns a list of swaps with unconfirmed funding tx (which require us to stay online)."""
        pending_swaps: List[SwapData] = []
        with self.swaps_lock:
            swaps = list(self._swaps.values())
        for swap in swaps:
            if swap.is_redeemed:
                # adb data might have been removed after is_redeemed was set.
                # in that case lnwatcher will no longer fetch the spending tx
                # and adb will return TX_HEIGHT_LOCAL
                continue
            # note: adb.get_tx_height returns TX_HEIGHT_LOCAL if the txid is unknown
            funding_height = self.lnworker.wallet.adb.get_tx_height(swap.funding_txid).height
            spending_height = self.lnworker.wallet.adb.get_tx_height(swap.spending_txid).height
            if funding_height > TX_HEIGHT_LOCAL and spending_height <= TX_HEIGHT_LOCAL:
                pending_swaps.append(swap)
        return pending_swaps
Returns a list of swaps with unconfirmed funding tx (which require us to stay online).
electrum/submarine_swaps.py