heisbuba commited on
Commit
3b16770
·
verified ·
1 Parent(s): 3246746

Upload main.py

Browse files
Files changed (1) hide show
  1. src/routes/main.py +5 -12
src/routes/main.py CHANGED
@@ -107,18 +107,11 @@ def terminal_wallet():
107
 
108
  @main_bp.route('/withdraw')
109
  def terminal_withdraw():
110
- """Withdrawal view with dynamic back-navigation logic"""
111
- # Capture the referring URL to determine navigation context
112
- referrer = request.referrer or ''
113
-
114
- # Internal Audit: Ensure back_url matches the specific routes used in htmx swaps
115
- if '/portfolio' in referrer:
116
- back_url = '/portfolio'
117
- else:
118
- # Default fallback to home if the referrer is external or /wallet
119
- back_url = '/home'
120
-
121
- return render_terminal('finance/withdraw.html', back_url=back_url)
122
 
123
  @main_bp.route('/fiat-history')
124
  def terminal_fiat_tnxs():
 
107
 
108
  @main_bp.route('/withdraw')
109
  def terminal_withdraw():
110
+ """Withdrawal view always navigates back to /home.
111
+ Withdraw is only accessible from the Home Command Center,
112
+ so back navigation is always deterministic.
113
+ """
114
+ return render_terminal('finance/withdraw.html', back_url='/home')
 
 
 
 
 
 
 
115
 
116
  @main_bp.route('/fiat-history')
117
  def terminal_fiat_tnxs():