All checks were successful
continuous-integration/drone/push Build is passing
Move the various sections to their own concerns, so they're easier to find and maintain
26 lines
715 B
Ruby
26 lines
715 B
Ruby
module Settings
|
|
module LightningNetworkSettings
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
field :lndhub_api_url, type: :string,
|
|
default: ENV["LNDHUB_API_URL"].presence
|
|
|
|
field :lndhub_enabled, type: :boolean,
|
|
default: ENV["LNDHUB_API_URL"].present?
|
|
|
|
field :lndhub_admin_token, type: :string,
|
|
default: ENV["LNDHUB_ADMIN_TOKEN"].presence
|
|
|
|
field :lndhub_admin_enabled, type: :boolean,
|
|
default: ENV["LNDHUB_ADMIN_UI"] || false
|
|
|
|
field :lndhub_public_key, type: :string,
|
|
default: (ENV["LNDHUB_PUBLIC_KEY"] || "")
|
|
|
|
field :lndhub_keysend_enabled, type: :boolean,
|
|
default: -> { self.lndhub_public_key.present? }
|
|
end
|
|
end
|
|
end
|