commit 184c2a7a1d9b244e222b5126826236667d13c40a
parent ead0484ed6c371c7c5f5a917be3134d406f6b8b1
Author: William Casarin <jb55@jb55.com>
Date: Mon, 28 Feb 2022 17:33:48 -0800
qr: don't strip port from host
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lightninglink/Views/SetupView.swift b/lightninglink/Views/SetupView.swift
@@ -170,10 +170,13 @@ func parse_auth_qr(_ qr: String) -> Either<String, LNLink> {
return .left("No nodeid found in auth qr")
}
- guard let host = url.host else {
+ guard var host = url.host else {
return .left("No hostname found in auth qr")
}
+ let port = url.port ?? 9735
+ host = host + ":\(port)"
+
guard let qs = URLComponents(string: auth_qr) else {
return .left("Invalid url querystring")
}