mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
fix/qol: Add Callback URL the Enable Banking Instructions (#1060)
* fix/qol: Add wich Callback URL to use to the Enable Banking Instructions * CodeRabbit suggestion * CodeRabbit suggestion * Skip CI failure on findings --------- Co-authored-by: Juan José Mata <jjmata@jjmata.com>
This commit is contained in:
committed by
GitHub
parent
4ba90e0e8a
commit
98df0d301a
@@ -139,6 +139,15 @@ module ApplicationHelper
|
||||
markdown.render(text).html_safe
|
||||
end
|
||||
|
||||
# Generate the callback URL for Enable Banking OAuth (used in views and controller).
|
||||
# In production, uses the standard Rails route.
|
||||
# In development, uses DEV_WEBHOOKS_URL if set (e.g., ngrok URL).
|
||||
def enable_banking_callback_url
|
||||
return callback_enable_banking_items_url if Rails.env.production?
|
||||
|
||||
ENV.fetch("DEV_WEBHOOKS_URL", root_url).chomp("/") + "/enable_banking_items/callback"
|
||||
end
|
||||
|
||||
# Formats quantity with adaptive precision based on the value size.
|
||||
# Shows more decimal places for small quantities (common with crypto).
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user