env defaults
This commit is contained in:
parent
aafa4bf3ad
commit
c49627a6e8
2 changed files with 11 additions and 12 deletions
|
|
@ -31,10 +31,11 @@ LIQUIDITY_PROVIDER_PUB=
|
|||
#BOOTSTRAP=1
|
||||
|
||||
#LSP
|
||||
OLYMPUS_LSP_URL=
|
||||
VOLTAGE_LSP_URL=
|
||||
LSP_CHANNEL_THRESHOLD=0
|
||||
LSP_MAX_FEE_BPS=0
|
||||
OLYMPUS_LSP_URL=https://lsps1.lnolymp.us/api/v1
|
||||
VOLTAGE_LSP_URL=https://lsp.voltageapi.com/api/v1
|
||||
FLASHSATS_LSP_URL=https://lsp.flashsats.xyz/lsp/channel
|
||||
LSP_CHANNEL_THRESHOLD=1000000
|
||||
LSP_MAX_FEE_BPS=100
|
||||
|
||||
#ROOT_FEES
|
||||
# Applied to either debits or credits and sent to an admin account
|
||||
|
|
|
|||
|
|
@ -8,19 +8,17 @@ export type LSPSettings = {
|
|||
olympusServiceUrl: string
|
||||
voltageServiceUrl: string
|
||||
flashsatsServiceUrl: string
|
||||
flashsatsNodeUri: string
|
||||
channelThreshold: number
|
||||
maxRelativeFee: number
|
||||
}
|
||||
|
||||
export const LoadLSPSettingsFromEnv = (): LSPSettings => {
|
||||
const olympusServiceUrl = process.env.OLYMPUS_LSP_URL || ""
|
||||
const voltageServiceUrl = process.env.VOLTAGE_LSP_URL || ""
|
||||
const flashsatsServiceUrl = process.env.FLASHSATS_LSP_URL || ""
|
||||
const flashsatsNodeUri = process.env.FLASHSATS_LSP_NODE_URI || ""
|
||||
const channelThreshold = EnvCanBeInteger("LSP_CHANNEL_THRESHOLD")
|
||||
const maxRelativeFee = EnvCanBeInteger("LSP_MAX_FEE_BPS") / 10000
|
||||
return { olympusServiceUrl, voltageServiceUrl, channelThreshold, maxRelativeFee, flashsatsServiceUrl, flashsatsNodeUri }
|
||||
const olympusServiceUrl = process.env.OLYMPUS_LSP_URL || "https://lsps1.lnolymp.us/api/v1"
|
||||
const voltageServiceUrl = process.env.VOLTAGE_LSP_URL || "https://lsp.voltageapi.com/api/v1"
|
||||
const flashsatsServiceUrl = process.env.FLASHSATS_LSP_URL || "https://lsp.flashsats.xyz/lsp/channel"
|
||||
const channelThreshold = EnvCanBeInteger("LSP_CHANNEL_THRESHOLD", 1000000)
|
||||
const maxRelativeFee = EnvCanBeInteger("LSP_MAX_FEE_BPS", 100) / 10000
|
||||
return { olympusServiceUrl, voltageServiceUrl, channelThreshold, maxRelativeFee, flashsatsServiceUrl }
|
||||
|
||||
}
|
||||
type OlympusOrder = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue