akkounts/app/jobs/create_lndhub_account_job.rb
Râu Cao eae370b737
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
Migrate from lockbox to ActiveRecord encryption (1/2)
2025-05-06 18:09:27 +04:00

14 lines
356 B
Ruby

class CreateLndhubAccountJob < ApplicationJob
queue_as :default
def perform(user)
return if user.lndhub_username.present? && user.lndhub_password.present?
lndhub = LndhubV2.new
credentials = lndhub.create_account
user.update! lndhub_username: credentials["login"],
lndhub_password: credentials["password"]
end
end