Initial commit
This commit is contained in:
11
lib/tasks/bitgo_webhooks.rake
Normal file
11
lib/tasks/bitgo_webhooks.rake
Normal file
@@ -0,0 +1,11 @@
|
||||
# encoding: UTF-8
|
||||
# frozen_string_literal: true
|
||||
|
||||
namespace :bitgo do
|
||||
desc 'Add a webhook that will result in an HTTP callback at the specified URL from BitGo when events are triggered.'
|
||||
task :webhooks, [:url] => [:environment] do
|
||||
Wallet.deposit.active.where(gateway: :bitgo).each do |w|
|
||||
w.service.register_webhooks!(args[:url])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user