-
-
+
+
-
+
@@ -52,13 +52,13 @@
Emailing Users on GitHub
-
diff --git a/app/controllers/api/v2/cart_controller.rb b/app/controllers/api/v2/cart_controller.rb
index a121c25e5..8d0063637 100644
--- a/app/controllers/api/v2/cart_controller.rb
+++ b/app/controllers/api/v2/cart_controller.rb
@@ -53,8 +53,6 @@ def checkout
# Render the JSON to trigger a Coinbase payment modal
elsif @checkout_method.is_a?(Account::Coinbase)
- raise "Coinbase is disabled" if ENV['COINBASE_DISABLED']
-
options = {
cancel_url: params[:cancel_url],
currency: params[:currency] || 'USD'
diff --git a/app/controllers/api/v2/cash_outs_controller.rb b/app/controllers/api/v2/cash_outs_controller.rb
index 280c7f2e1..9a747bf55 100644
--- a/app/controllers/api/v2/cash_outs_controller.rb
+++ b/app/controllers/api/v2/cash_outs_controller.rb
@@ -20,9 +20,6 @@ def show
end
def create
- raise "Coinbase is disabled" if params[:bitcoin_address] && ENV['COINBASE_DISABLED']
- raise "Checks are disabled" if params[:mailing_address_id]
-
if team_id = params[:source].try(:match, /\Ateam(\d+)\Z/).try(:[], 1)
account = current_user.team_member_relations.where(admin: true, team_id: team_id).first.try(:team).try(:account)
else
diff --git a/app/views/layouts/_env.html.erb b/app/views/layouts/_env.html.erb
index 29fe6d509..2bbde9ac2 100644
--- a/app/views/layouts/_env.html.erb
+++ b/app/views/layouts/_env.html.erb
@@ -11,7 +11,6 @@
stripe_key: '<%=ENV['STRIPE_PUBLIC_KEY']%>',
stripe_image: 'https://s3.amazonaws.com/stripe-uploads/acct_15jcQ4LM04M7PZLcmerchant-icon-1427143578024-Bountysource-square-100.png',
bountysource_grey_image: '<%=asset_path("bountysource-grey.png")%>',
- bountysource_anon_image: '<%=asset_path("anon.jpg")%>',
- coinbase_enabled: <%=!ENV['COINBASE_DISABLED']%>
+ bountysource_anon_image: '<%=asset_path("anon.jpg")%>'
};
diff --git a/config/application.rb b/config/application.rb
index ffb5309f3..f625e283b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -12,6 +12,7 @@
module Api
class Application < Rails::Application
+
# All times should be in UTC
ENV['TZ'] = 'UTC'
config.time_zone = 'UTC'
@@ -124,7 +125,9 @@ class Application < Rails::Application
api_key: ENV['COINBASE_API_KEY'],
api_secret: ENV['COINBASE_API_SECRET'],
callback_url: "#{config.api_url}payments/coinbase/callback"
- }
+ }
+ ENV['COINBASE_DISABLED'] = 'true'
+ config.coinbase_enabled = !ENV['COINBASE_DISABLED']
# GitHub App
config.github_api = {