def get_bumpfee_strategies_for_tx(
        self,
        *,
        tx: Transaction,
    ) -> Tuple[Sequence[BumpFeeStrategy], int]:
        """Returns tuple(list of available strategies, idx of recommended option among those)."""
        all_strats = BumpFeeStrategy.all()
        # are we paying max?
        invoices = self.get_relevant_invoices_for_tx(tx.txid())
        if len(invoices) == 1 and len(invoices[0].outputs) == 1:
            if invoices[0].outputs[0].value == '!':
                return all_strats, all_strats.index(BumpFeeStrategy.DECREASE_PAYMENT)
        # do not decrease payment if it is a swap
        if self.get_swaps_by_funding_tx(tx):
            return [BumpFeeStrategy.PRESERVE_PAYMENT], 0
        # default
        return all_strats, all_strats.index(BumpFeeStrategy.PRESERVE_PAYMENT)
Returns tuple(list of available strategies, idx of recommended option among those).
electrum/wallet.py