def METHOD_NAME(self):
    self.amount_e.setFrozen(self.max_button.isChecked())
    if not self.max_button.isChecked():
        return
    dummy_nodeid = ecc.GENERATOR.get_public_key_bytes(compressed=True)
    make_tx = self.window.mktx_for_open_channel(funding_sat='!', node_id=dummy_nodeid)
    try:
        tx = make_tx(None)
    except (NotEnoughFunds, NoDynamicFeeEstimates) as e:
        self.max_button.setChecked(False)
        self.amount_e.setFrozen(False)
        self.window.show_error(str(e))
        return
    amount = tx.output_value()
    amount = min(amount, self.config.LIGHTNING_MAX_FUNDING_SAT)
    self.amount_e.setAmount(amount)