Migrate from lockbox to ActiveRecord encryption (1/2)
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
2025-05-06 18:09:27 +04:00
parent 15a9fdec3e
commit eae370b737
24 changed files with 104 additions and 56 deletions

View File

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