Add LndHub service, lnurl-pay endpoints
Enables the lnurl-pay payment workflow
This commit is contained in:
@@ -2,14 +2,10 @@ class CreateLndhubWalletJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(user)
|
||||
res = Faraday.post("#{ENV["LNDHUB_API_URL"]}/create",
|
||||
{ partnerid: "bluewallet", accounttype: "common" }.to_json,
|
||||
"Content-Type" => "application/json")
|
||||
|
||||
credentials = JSON.parse(res.body)
|
||||
lndhub = Lndhub.new
|
||||
credentials = lndhub.create({ partnerid: user.ou, accounttype: "user" })
|
||||
|
||||
user.update! ln_login: credentials["login"],
|
||||
ln_password: credentials["password"]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user