Skip to content

Commit

Permalink
check for tlCert before calling
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Oct 27, 2022
1 parent df06899 commit 810a6d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions galoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ accountLimits:
spamLimits:
memoSharingSatsThreshold: 1000
memoSharingCentsThreshold: 50
twoFALimits:
threshold: 10000
ipRecording:
enabled: true
proxyChecking:
Expand Down
7 changes: 6 additions & 1 deletion src/services/loopd/loop-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import {
OutTermsResponse,
} from "./protos/loop_pb"

import { ConfigError } from "src/config/error"

export const LoopService = ({
macaroon,
tlsCert,
Expand All @@ -41,7 +43,10 @@ export const LoopService = ({
lndInstanceName,
}: LoopdConfig): ISwapService => {
const mac = Buffer.from(macaroon, "base64").toString("hex") as Macaroon
const tls = Buffer.from(tlsCert!, "base64")
if (!tlsCert) {
throw new ConfigError("missing LOOP_TLS")
}
const tls = Buffer.from(tlsCert, "base64")
const swapClient: ServiceClient = createClient(mac, tls, grpcEndpoint)

// helpers
Expand Down

0 comments on commit 810a6d7

Please sign in to comment.