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:
dekun
2026-07-07 08:33:23 +08:00
parent 806bb074ab
commit ae0c44e20d
5 changed files with 10 additions and 7 deletions
+1 -3
View File
@@ -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")