From 4ae5fb138c6d829f1247b4dfa1439c78f78907e2 Mon Sep 17 00:00:00 2001 From: Matthew Ramsden <6657488+reez@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:41:11 -0500 Subject: [PATCH] misc: remove unused extension and lowercase --- LDKNodeMonday/Extensions/String+Extensions.swift | 9 --------- .../View Model/Home/Receive/BIP21ViewModel.swift | 2 +- LDKNodeMonday/View/Home/Receive/BIP21View.swift | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/LDKNodeMonday/Extensions/String+Extensions.swift b/LDKNodeMonday/Extensions/String+Extensions.swift index 41bc80c..49570ce 100644 --- a/LDKNodeMonday/Extensions/String+Extensions.swift +++ b/LDKNodeMonday/Extensions/String+Extensions.swift @@ -107,15 +107,6 @@ extension String { return words.map { $0.capitalized }.joined(separator: " ") } - private var isLightningAddress: Bool { - let lowercasedSelf = self.lowercased() - let queryParams = self.queryParameters() - if let lightningParam = queryParams["lightning"], !lightningParam.isEmpty { - return true - } - return lowercasedSelf.starts(with: "ln") || lowercasedSelf.hasPrefix("lightning:") - } - private var isBitcoinAddress: Bool { return lowercased().hasPrefix("bitcoin:") || isValidBitcoinAddress } diff --git a/LDKNodeMonday/View Model/Home/Receive/BIP21ViewModel.swift b/LDKNodeMonday/View Model/Home/Receive/BIP21ViewModel.swift index 5e0facb..532d267 100644 --- a/LDKNodeMonday/View Model/Home/Receive/BIP21ViewModel.swift +++ b/LDKNodeMonday/View Model/Home/Receive/BIP21ViewModel.swift @@ -25,7 +25,7 @@ class BIP21ViewModel: ObservableObject { ) DispatchQueue.main.async { - self.unified = unifiedLowercase + self.unified = unified } } catch let error as NodeError { let errorString = handleNodeError(error) diff --git a/LDKNodeMonday/View/Home/Receive/BIP21View.swift b/LDKNodeMonday/View/Home/Receive/BIP21View.swift index 28a2b74..18c6186 100644 --- a/LDKNodeMonday/View/Home/Receive/BIP21View.swift +++ b/LDKNodeMonday/View/Home/Receive/BIP21View.swift @@ -19,7 +19,6 @@ struct BIP21View: View { @State private var bolt12ShowCheckmark = false @State private var unifiedIsCopied = false @State private var unifiedShowCheckmark = false - @State private var showingReceiveViewErrorAlert = false @State private var isKeyboardVisible = false