guard against lndrest URLs without a leading http...
This commit is contained in:
parent
1ce9936561
commit
6e6ce093f0
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,10 @@ class LndRestWallet(Wallet):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
endpoint = getenv("LND_REST_ENDPOINT")
|
endpoint = getenv("LND_REST_ENDPOINT")
|
||||||
self.endpoint = endpoint[:-1] if endpoint.endswith("/") else endpoint
|
endpoint = endpoint[:-1] if endpoint.endswith("/") else endpoint
|
||||||
|
endpoint = "https://" + endpoint if not endpoint.startswith("http") else endpoint
|
||||||
|
self.endpoint = endpoint
|
||||||
|
|
||||||
self.auth_admin = {
|
self.auth_admin = {
|
||||||
"Grpc-Metadata-macaroon": getenv("LND_ADMIN_MACAROON") or getenv("LND_REST_ADMIN_MACAROON"),
|
"Grpc-Metadata-macaroon": getenv("LND_ADMIN_MACAROON") or getenv("LND_REST_ADMIN_MACAROON"),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue