fix: always show OKX options nav tab and allow options page without redirect
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6683,6 +6683,7 @@ def render_main_page(page="trade", embed_mode=None):
|
||||
funds_fmt=format_funds_u,
|
||||
exchange_display=EXCHANGE_DISPLAY_NAME,
|
||||
options_enabled=OKX_OPTIONS_ENABLED,
|
||||
options_nav_visible=True,
|
||||
options_trade_budget=OKX_OPTIONS_TRADE_BUDGET_USDC,
|
||||
options_default_underly=OKX_OPTIONS_DEFAULT_UNDERLY,
|
||||
risk_status=risk_status,
|
||||
@@ -6767,9 +6768,6 @@ def settings_page():
|
||||
@app.route("/options")
|
||||
@login_required
|
||||
def options_main_page():
|
||||
if not OKX_OPTIONS_ENABLED:
|
||||
flash("期权模块未启用,请在 .env 设置 OKX_OPTIONS_ENABLED=true")
|
||||
return redirect(url_for("trade_page"))
|
||||
return render_main_page("options")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user