-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow loop creds to be empty if not enabled #1891
Conversation
throw new ConfigError("Missing LND1_LOOP_MACAROON config") | ||
if (!process.env.LND2_LOOP_MACAROON) | ||
throw new ConfigError("Missing LND2_LOOP_MACAROON config") | ||
if (getCronConfig().swapEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be part of service validation
copied from #1733 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did not think we were allowed to call process.env
from any other file other than process.ts
? should i just set it to blank if it does not exist and then in the loopservice i can validate?
src/services/loopd/loop-service.ts
Outdated
@@ -41,6 +43,9 @@ export const LoopService = ({ | |||
lndInstanceName, | |||
}: LoopdConfig): ISwapService => { | |||
const mac = Buffer.from(macaroon, "base64").toString("hex") as Macaroon | |||
if (!tlsCert) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably here should be the validation, also service should not throw exceptions. Please check onchain service as example
copied from #1733 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not ever happen - either config is set and tlsCert
is never null or it is not set and this code should never be called see eab6cd4
I have added a commit eab6cd4 that throws in the config if we try to access the loop config in the event that |
Yeah this commit looks good and makes sense. I am still having trouble getting tests to run locally when testing this change, similar error to the e2e test |
Not sure why the |
i tested it and it works locally now. i would defer to @bodymindarts about the tracing config |
I created a custom docker image of this commit and it works with signet on my local dev charts node! Here is the config I set: dev/galoy/galoy-signet-values.yml
|
moved from #1733