diff --git a/loafwallet.xcodeproj/project.pbxproj b/loafwallet.xcodeproj/project.pbxproj index 5fca5951c..4fcf23d86 100644 --- a/loafwallet.xcodeproj/project.pbxproj +++ b/loafwallet.xcodeproj/project.pbxproj @@ -305,7 +305,6 @@ C3B7C3B9255EABBF00E98A64 /* SupportSafariViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C3B8255EABBF00E98A64 /* SupportSafariViewModel.swift */; }; C3B7C3C2255EAF1200E98A64 /* SupportSafariView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C3C1255EAF1200E98A64 /* SupportSafariView.swift */; }; C3B7C3EE255FF59200E98A64 /* ConstantsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C3ED255FF59200E98A64 /* ConstantsTests.swift */; }; - C3B7C43F25620D4400E98A64 /* SupportLitecoinFoundationViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C43E25620D4400E98A64 /* SupportLitecoinFoundationViewModelTests.swift */; }; C3BD49B72595420A00D97079 /* RegistrationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49B62595420A00D97079 /* RegistrationViewModel.swift */; }; C3BD49C02595423400D97079 /* RegistrationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49BF2595423400D97079 /* RegistrationView.swift */; }; C3BD49C925954A1B00D97079 /* ForgotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49C825954A1B00D97079 /* ForgotView.swift */; }; @@ -332,8 +331,6 @@ C3EFA9A62651A808005C59B5 /* LockScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EFA9A52651A808005C59B5 /* LockScreenTests.swift */; }; C3F4A4A326A2FA1D0008B1B2 /* TransferAmountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F4A4A226A2FA1D0008B1B2 /* TransferAmountView.swift */; }; C3F4A4A526A2FB1E0008B1B2 /* TransferAmountViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F4A4A426A2FB1E0008B1B2 /* TransferAmountViewModel.swift */; }; - C3F55645255A193D005F786F /* SupportLitecoinFoundationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F55644255A193D005F786F /* SupportLitecoinFoundationView.swift */; }; - C3F55655255A195B005F786F /* SupportLitecoinFoundationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F55654255A195B005F786F /* SupportLitecoinFoundationViewModel.swift */; }; C3F7BCDC25FEC6AD00694C28 /* FailedAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F7BCD925FEC6AC00694C28 /* FailedAlertView.swift */; }; C3F7BCDD25FEC6AD00694C28 /* DomainResolutionFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F7BCDA25FEC6AC00694C28 /* DomainResolutionFailure.swift */; }; C3F7BCDE25FEC6AD00694C28 /* AlertFailureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F7BCDB25FEC6AC00694C28 /* AlertFailureView.swift */; }; @@ -1500,7 +1497,6 @@ C3B7C3B8255EABBF00E98A64 /* SupportSafariViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportSafariViewModel.swift; sourceTree = ""; }; C3B7C3C1255EAF1200E98A64 /* SupportSafariView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportSafariView.swift; sourceTree = ""; }; C3B7C3ED255FF59200E98A64 /* ConstantsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsTests.swift; sourceTree = ""; }; - C3B7C43E25620D4400E98A64 /* SupportLitecoinFoundationViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportLitecoinFoundationViewModelTests.swift; sourceTree = ""; }; C3BD49B62595420A00D97079 /* RegistrationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationViewModel.swift; sourceTree = ""; }; C3BD49BF2595423400D97079 /* RegistrationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationView.swift; sourceTree = ""; }; C3BD49C825954A1B00D97079 /* ForgotView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotView.swift; sourceTree = ""; }; @@ -1530,8 +1526,6 @@ C3EFA9A52651A808005C59B5 /* LockScreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenTests.swift; sourceTree = ""; }; C3F4A4A226A2FA1D0008B1B2 /* TransferAmountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferAmountView.swift; sourceTree = SOURCE_ROOT; }; C3F4A4A426A2FB1E0008B1B2 /* TransferAmountViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferAmountViewModel.swift; sourceTree = ""; }; - C3F55644255A193D005F786F /* SupportLitecoinFoundationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportLitecoinFoundationView.swift; sourceTree = ""; }; - C3F55654255A195B005F786F /* SupportLitecoinFoundationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportLitecoinFoundationViewModel.swift; sourceTree = ""; }; C3F7BCD925FEC6AC00694C28 /* FailedAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FailedAlertView.swift; sourceTree = ""; }; C3F7BCDA25FEC6AC00694C28 /* DomainResolutionFailure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainResolutionFailure.swift; sourceTree = ""; }; C3F7BCDB25FEC6AC00694C28 /* AlertFailureView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertFailureView.swift; sourceTree = ""; }; @@ -2204,7 +2198,6 @@ C345D81325A8D50600657E30 /* LitecoinCardTests */, 24470E4423A608A700ADDA27 /* AmountTests.swift */, 2494037523AD35C000369261 /* BuyWKWebVCTests.swift */, - C3B7C43E25620D4400E98A64 /* SupportLitecoinFoundationViewModelTests.swift */, C3D783BF2565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift */, C31891C0267338D300ECE25C /* NonUSTabBarViewControllerTests.swift */, C31891C226733FD400ECE25C /* TabBarViewControllerTests.swift */, @@ -3195,7 +3188,6 @@ C3B7C3C1255EAF1200E98A64 /* SupportSafariView.swift */, C3BD4A692597E1E900D97079 /* CardLoggedInView.swift */, C3BDB42926CDA74B004DAE77 /* CardNoTransferView.swift */, - C3F55643255A1916005F786F /* SupportLitecoinFoundation */, C35ABD08257404D2002BB9BB /* Partners */, C35ABD0925740518002BB9BB /* About */, C3D783A52565EA1E0004FF70 /* Unstoppable */, @@ -3259,15 +3251,6 @@ path = "Lock Screen Tests"; sourceTree = ""; }; - C3F55643255A1916005F786F /* SupportLitecoinFoundation */ = { - isa = PBXGroup; - children = ( - C3F55644255A193D005F786F /* SupportLitecoinFoundationView.swift */, - C3F55654255A195B005F786F /* SupportLitecoinFoundationViewModel.swift */, - ); - name = SupportLitecoinFoundation; - sourceTree = ""; - }; C3F7BCD825FEC69B00694C28 /* Alerts */ = { isa = PBXGroup; children = ( @@ -4144,7 +4127,6 @@ 24470E3023A5F55700ADDA27 /* BRHTTPServerTests.swift in Sources */, 24470E3A23A5FF5700ADDA27 /* TestHelpers.swift in Sources */, C345D83725A8D57E00657E30 /* AnimatedCardViewModelTests.swift in Sources */, - C3B7C43F25620D4400E98A64 /* SupportLitecoinFoundationViewModelTests.swift in Sources */, C345D82525A8D54200657E30 /* RegistrationViewModelTests.swift in Sources */, 24470E3623A5FDE800ADDA27 /* PhraseTests.swift in Sources */, C308993F2616124800EE6A40 /* CardWalletTests.swift in Sources */, @@ -4371,7 +4353,6 @@ CEC6AA441DEFCDE900EE5AFD /* ModalViewController.swift in Sources */, C3F7BCDC25FEC6AD00694C28 /* FailedAlertView.swift in Sources */, 24313C8423820C4B00A83F69 /* ReceiveLTCViewController.swift in Sources */, - C3F55655255A195B005F786F /* SupportLitecoinFoundationViewModel.swift in Sources */, CEEC70831E90C07C00EF788E /* Setting.swift in Sources */, CE45C1F91E74B400002C3847 /* ManageWalletViewController.swift in Sources */, CE92F9F01DED0C790046B516 /* PresentModalAnimator.swift in Sources */, @@ -4408,7 +4389,6 @@ CE5E6C941EB7964900A476DB /* WalletDisabledView.swift in Sources */, C377519926B09A3400E1FB12 /* TransferringView.swift in Sources */, CEF3E8341DE57166007C0A9E /* AnimatableIcon.swift in Sources */, - C3F55645255A193D005F786F /* SupportLitecoinFoundationView.swift in Sources */, CEF61B161ED2056D00C7EA6A /* NumberFormatter+Additions.swift in Sources */, CEF3E8321DE55540007C0A9E /* CheckView.swift in Sources */, C3BD49C925954A1B00D97079 /* ForgotView.swift in Sources */, @@ -4818,7 +4798,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; @@ -4926,7 +4906,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; @@ -5237,7 +5217,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = ZV7987N2ZC; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; FRAMEWORK_SEARCH_PATHS = ( @@ -5268,7 +5248,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; @@ -5368,7 +5348,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; FRAMEWORK_SEARCH_PATHS = ( @@ -5400,7 +5380,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; diff --git a/loafwallet/src/Constants/Strings.swift b/loafwallet/src/Constants/Strings.swift index a10ab16d1..eeabe248b 100644 --- a/loafwallet/src/Constants/Strings.swift +++ b/loafwallet/src/Constants/Strings.swift @@ -666,10 +666,6 @@ enum S { static let signing = NSLocalizedString("Import.Error.signing", value: "**Error signing transaction**", comment: "Import signing error message") } } - - enum SupportLitecoinFoundation { - static let title = NSLocalizedString("SupportTheFoundation.title", value: "**Support the Litecoin Foundation**", comment: "Support the Litecoin Foundation") - } enum WipeWallet { static let title = NSLocalizedString("WipeWallet.title", value: "**Start or Recover Another Wallet**", comment: "Wipe wallet navigation item title.") diff --git a/loafwallet/src/Controls/MenuButtonType.swift b/loafwallet/src/Controls/MenuButtonType.swift index 78e9c7402..8dd4b9be1 100644 --- a/loafwallet/src/Controls/MenuButtonType.swift +++ b/loafwallet/src/Controls/MenuButtonType.swift @@ -11,7 +11,6 @@ import UIKit enum MenuButtonType { case security case customerSupport - case supportGiveToLF case settings case lock @@ -21,8 +20,6 @@ enum MenuButtonType { return S.MenuButton.security case .customerSupport: return S.MenuButton.support - case .supportGiveToLF: - return S.SupportLitecoinFoundation.title case .settings: return S.MenuButton.settings case .lock: @@ -36,8 +33,6 @@ enum MenuButtonType { return #imageLiteral(resourceName: "Shield") case .customerSupport: return #imageLiteral(resourceName: "FaqFill") - case .supportGiveToLF: - return #imageLiteral(resourceName: "buy_icon_gray") case .settings: return #imageLiteral(resourceName: "Settings") case .lock: diff --git a/loafwallet/src/ModalPresenter.swift b/loafwallet/src/ModalPresenter.swift index 6fe14d23f..0bde3b99e 100644 --- a/loafwallet/src/ModalPresenter.swift +++ b/loafwallet/src/ModalPresenter.swift @@ -363,7 +363,7 @@ class ModalPresenter : Subscriber, Trackable { menu.didTapSupport = { [weak self, weak menu] in menu?.dismiss(animated: true, completion: { - let urlString = "https://litecoinfoundation.zendesk.com/hc/en-us" + let urlString = "https://support.litewallet.io" guard let url = URL(string: urlString) else { return } @@ -372,12 +372,6 @@ class ModalPresenter : Subscriber, Trackable { }) } - menu.didTapGiveSupportLF = { [weak self, weak menu] in - menu?.dismiss(animated: true, completion: { - self?.presentSupportLF() - }) - } - menu.didTapLock = { [weak self, weak menu] in menu?.dismiss(animated: true) { self?.store.trigger(name: .lock) @@ -569,20 +563,6 @@ class ModalPresenter : Subscriber, Trackable { parent?.present(vc, animated: true, completion: {}) } } - - // MARK: - Present Support LF View - private func presentSupportLF() { - - let supportLFView = UIHostingController(rootView: SupportLitecoinFoundationView(viewModel: SupportLitecoinFoundationViewModel())) - - supportLFView.rootView.viewModel.didTapToDismiss = { - supportLFView.dismiss(animated: true) { - //TODO: Track in Analytics - } - } - window.rootViewController?.present(supportLFView, animated: true, completion: nil) - - } private func presentSecurityCenter() { guard let walletManager = walletManager else { return } diff --git a/loafwallet/src/ViewControllers/RootModals/MenuViewController.swift b/loafwallet/src/ViewControllers/RootModals/MenuViewController.swift index 77bfedb54..396f48456 100644 --- a/loafwallet/src/ViewControllers/RootModals/MenuViewController.swift +++ b/loafwallet/src/ViewControllers/RootModals/MenuViewController.swift @@ -13,14 +13,13 @@ class MenuViewController : UIViewController, Trackable { //MARK: - Public var didTapSecurity: (() -> Void)? var didTapSupport: (() -> Void)? - var didTapGiveSupportLF: (() -> Void)? var didTapSettings: (() -> Void)? var didTapLock: (() -> Void)? //MARK: - Private fileprivate let buttonHeight: CGFloat = 72.0 fileprivate let buttons: [MenuButton] = { - let types: [MenuButtonType] = [.security, .customerSupport, .supportGiveToLF, .settings, .lock] + let types: [MenuButtonType] = [.security, .customerSupport, .settings, .lock] return types.compactMap { return MenuButton(type: $0) } @@ -64,8 +63,6 @@ class MenuViewController : UIViewController, Trackable { didTapSecurity?() case .customerSupport: didTapSupport?() - case .supportGiveToLF: - didTapGiveSupportLF?() case .settings: didTapSettings?() case .lock: diff --git a/loafwalletTests/Class Tests/SupportLitecoinFoundationViewModelTests.swift b/loafwalletTests/Class Tests/SupportLitecoinFoundationViewModelTests.swift deleted file mode 100644 index 8e6f35fcd..000000000 --- a/loafwalletTests/Class Tests/SupportLitecoinFoundationViewModelTests.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// SupportLitecoinFoundationViewModelTests.swift -// loafwalletTests -// -// Created by Kerry Washington on 11/16/20. -// Copyright © 2020 Litecoin Foundation. All rights reserved. -// - -import XCTest -@testable import loafwallet - -class SupportLitecoinFoundationViewModelTests: XCTestCase { - - var viewModel: SupportLitecoinFoundationViewModel! - - override func setUp() { - super.setUp() - viewModel = SupportLitecoinFoundationViewModel() - } - - /// Checks the user taps on the closure - func testDidTapToDismiss() throws { - - self.viewModel.didTapToDismiss?() - - viewModel.didTapToDismiss = { - XCTAssert(true, "Tap did work") - } - } - -}