diff --git a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d09005c6e7..7b8c9904c2 100644 --- a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -162,15 +162,6 @@ "version" : "1.3.1" } }, - { - "identity" : "intercom-ios-sp", - "kind" : "remoteSourceControl", - "location" : "https://github.com/intercom/intercom-ios-sp", - "state" : { - "revision" : "1031655ceb49a8c8975b0cb138fe3bed897d159e", - "version" : "15.0.3" - } - }, { "identity" : "jazziconswift", "kind" : "remoteSourceControl", @@ -194,8 +185,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher.git", "state" : { - "revision" : "c75584ac759cbb16b204d0a7de3ebf53ea6b304d", - "version" : "7.9.0" + "revision" : "add0a87ec4e31e2ca2a0b2085f0559201e4f5918", + "version" : "7.10.1" } }, { @@ -239,8 +230,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/marmelroy/PhoneNumberKit.git", "state" : { - "revision" : "b6c141f4a97dde7cd3ea335a5d6d679faa7675f6", - "version" : "3.6.7" + "revision" : "d2886b0735a47e47fb227504666756efb2e2ac26", + "version" : "3.7.6" } }, { @@ -401,8 +392,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-snapshot-testing", "state" : { - "revision" : "dc46eeb3928a75390651fac6c1ef7f93ad59a73b", - "version" : "1.11.1" + "revision" : "59b663f68e69f27a87b45de48cb63264b8194605", + "version" : "1.15.1" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-syntax.git", + "state" : { + "revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036", + "version" : "509.0.2" } }, { diff --git a/p2p_wallet/AppDelegate/AppDelegate.swift b/p2p_wallet/AppDelegate/AppDelegate.swift index 2889a0401b..b02cc5888d 100644 --- a/p2p_wallet/AppDelegate/AppDelegate.swift +++ b/p2p_wallet/AppDelegate/AppDelegate.swift @@ -27,7 +27,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { Defaults.fiat = .usd UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable") - IntercomStartingConfigurator().configure() setupNavigationAppearance() diff --git a/p2p_wallet/AppDelegate/AppDelegateProxyService/AppDelegateProxyService.swift b/p2p_wallet/AppDelegate/AppDelegateProxyService/AppDelegateProxyService.swift index d52fd05747..7d7126ff9d 100644 --- a/p2p_wallet/AppDelegate/AppDelegateProxyService/AppDelegateProxyService.swift +++ b/p2p_wallet/AppDelegate/AppDelegateProxyService/AppDelegateProxyService.swift @@ -9,7 +9,6 @@ final class AppDelegateProxyService: NSObject, UIApplicationDelegate { AppflyerAppDelegateService(), DeeplinkAppDelegateService(), HistoryAppdelegateService(), - IntercomAppDelegateService(), LokaliseAppDelegateService(), ] serviceAppDelegates = services.compactMap { $0 } diff --git a/p2p_wallet/AppDelegate/AppDelegateProxyService/DeeplinkAppDelegateService.swift b/p2p_wallet/AppDelegate/AppDelegateProxyService/DeeplinkAppDelegateService.swift index e31e50183d..a48141ccbf 100644 --- a/p2p_wallet/AppDelegate/AppDelegateProxyService/DeeplinkAppDelegateService.swift +++ b/p2p_wallet/AppDelegate/AppDelegateProxyService/DeeplinkAppDelegateService.swift @@ -61,21 +61,9 @@ final class DeeplinkAppDelegateService: NSObject, AppDelegateService { return } - // Intercom survey - // https://key.app/intercom?intercom_survey_id=133423424 - if urlComponents.host == "key.app", - urlComponents.path == "/intercom", - let queryItem = urlComponents.queryItems?.first(where: { $0.name == "intercom_survey_id" }), - let value = queryItem.value - { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - GlobalAppState.shared.surveyID = value - } - } - // Send via link // https://t.key.app/ - else if urlComponents.host == "t.key.app" { + if urlComponents.host == "t.key.app" { GlobalAppState.shared.sendViaLinkUrl = urlComponents.url } } diff --git a/p2p_wallet/AppDelegate/AppDelegateProxyService/IntercomAppDelegateService.swift b/p2p_wallet/AppDelegate/AppDelegateProxyService/IntercomAppDelegateService.swift deleted file mode 100644 index 4b1c25a282..0000000000 --- a/p2p_wallet/AppDelegate/AppDelegateProxyService/IntercomAppDelegateService.swift +++ /dev/null @@ -1,21 +0,0 @@ -import Foundation -import Intercom - -final class IntercomAppDelegateService: NSObject, AppDelegateService { - // MARK: - Methods - - func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { - Intercom.setDeviceToken(deviceToken) { error in - #if DEBUG - if let error { - print("Intercom.setDeviceToken error: ", error) - } - #endif - } - } - - func applicationWillResignActive(_: UIApplication) { - // Hide any presented intercom vc - Intercom.hide() - } -} diff --git a/p2p_wallet/Common/Services/Intercom/HelpCenterLauncher.swift b/p2p_wallet/Common/Services/Intercom/HelpCenterLauncher.swift deleted file mode 100644 index 76fb6449ac..0000000000 --- a/p2p_wallet/Common/Services/Intercom/HelpCenterLauncher.swift +++ /dev/null @@ -1,3 +0,0 @@ -protocol HelpCenterLauncher: AnyObject { - func launch() -} diff --git a/p2p_wallet/Common/Services/Intercom/IntercomMessengerLauncher.swift b/p2p_wallet/Common/Services/Intercom/IntercomMessengerLauncher.swift deleted file mode 100644 index fd1260ca64..0000000000 --- a/p2p_wallet/Common/Services/Intercom/IntercomMessengerLauncher.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Intercom -import Resolver - -final class IntercomMessengerLauncher: HelpCenterLauncher { - private let attributesService = IntercomUserAttributesService() - - func launch() { - attributesService.setParameters() - - Intercom.presentMessenger() - } -} diff --git a/p2p_wallet/Common/Services/Intercom/IntercomStartingConfigurator.swift b/p2p_wallet/Common/Services/Intercom/IntercomStartingConfigurator.swift deleted file mode 100644 index 9dfbd8597b..0000000000 --- a/p2p_wallet/Common/Services/Intercom/IntercomStartingConfigurator.swift +++ /dev/null @@ -1,8 +0,0 @@ -import Intercom - -final class IntercomStartingConfigurator { - func configure() { - Intercom.setApiKey("ios_sdk-ea34dac95867378c8a568a970312d07a668822fc", forAppId: "imvolhpe") - Intercom.loginUnidentifiedUser() - } -} diff --git a/p2p_wallet/Common/Services/Intercom/IntercomUserAttributesService.swift b/p2p_wallet/Common/Services/Intercom/IntercomUserAttributesService.swift deleted file mode 100644 index e32a4772f1..0000000000 --- a/p2p_wallet/Common/Services/Intercom/IntercomUserAttributesService.swift +++ /dev/null @@ -1,21 +0,0 @@ -import Intercom -import Resolver -import SolanaSwift - -final class IntercomUserAttributesService { - @Injected private var nameStorage: NameStorageType - @Injected private var accountStorage: SolanaAccountStorage - - func setParameters() { - let userAddress = accountStorage.account?.publicKey.base58EncodedString - let name = nameStorage.getName() - - let userAttributes = ICMUserAttributes() - userAttributes.name = name - if let userAddress = userAddress { - userAttributes.customAttributes = ["public_address": userAddress] - } - - Intercom.updateUser(with: userAttributes) - } -} diff --git a/p2p_wallet/Injection/Resolver+registerAllServices.swift b/p2p_wallet/Injection/Resolver+registerAllServices.swift index c1166ccfd5..1e9db0f145 100644 --- a/p2p_wallet/Injection/Resolver+registerAllServices.swift +++ b/p2p_wallet/Injection/Resolver+registerAllServices.swift @@ -226,10 +226,6 @@ extension Resolver: ResolverRegistering { /// Graph scope: Recreate and reuse dependencies @MainActor private static func registerForGraphScope() { - // Intercom - register { IntercomMessengerLauncher() } - .implements(HelpCenterLauncher.self) - // ImageSaver register { ImageSaver() } .implements(ImageSaverType.self) diff --git a/p2p_wallet/Scenes/Main/NewSettings/Settings/View/SettingsView.swift b/p2p_wallet/Scenes/Main/NewSettings/Settings/View/SettingsView.swift index acd699e130..bdefac3782 100644 --- a/p2p_wallet/Scenes/Main/NewSettings/Settings/View/SettingsView.swift +++ b/p2p_wallet/Scenes/Main/NewSettings/Settings/View/SettingsView.swift @@ -49,10 +49,6 @@ struct SettingsView: View { } ) } - Button( - action: { viewModel.showView(.support) }, - label: { cellView(image: .settingsSupport, title: L10n.support.uppercaseFirst) } - ) Button( action: { viewModel.sendSignOutAnalytics() diff --git a/p2p_wallet/Scenes/Main/NewSettings/Settings/ViewModel/SettingsViewModel.swift b/p2p_wallet/Scenes/Main/NewSettings/Settings/ViewModel/SettingsViewModel.swift index 554b48cd89..791008c68e 100644 --- a/p2p_wallet/Scenes/Main/NewSettings/Settings/ViewModel/SettingsViewModel.swift +++ b/p2p_wallet/Scenes/Main/NewSettings/Settings/ViewModel/SettingsViewModel.swift @@ -66,8 +66,6 @@ final class SettingsViewModel: BaseViewModel, ObservableObject { return KeyAppAnalyticsEvent.settingsPinClick case .network: return KeyAppAnalyticsEvent.settingsNetworkClick - case .support: - return KeyAppAnalyticsEvent.settingsSupportClick case .recoveryKit: return KeyAppAnalyticsEvent.settingsRecoveryClick default: @@ -195,7 +193,6 @@ final class SettingsViewModel: BaseViewModel, ObservableObject { extension SettingsViewModel { enum OpenAction { case username - case support case reserveUsername(userAddress: String) case recoveryKit case yourPin diff --git a/p2p_wallet/Scenes/Main/NewSettings/SettingsCoordinator.swift b/p2p_wallet/Scenes/Main/NewSettings/SettingsCoordinator.swift index 34e51f2004..04652fe013 100644 --- a/p2p_wallet/Scenes/Main/NewSettings/SettingsCoordinator.swift +++ b/p2p_wallet/Scenes/Main/NewSettings/SettingsCoordinator.swift @@ -3,8 +3,6 @@ import Resolver import UIKit final class SettingsCoordinator: Coordinator { - @Injected private var helpLauncher: HelpCenterLauncher - private let navigationController: UINavigationController init(navigationController: UINavigationController) { @@ -24,8 +22,6 @@ final class SettingsCoordinator: Coordinator { case .username: let vc = NewUsernameViewController() navigationController.pushViewController(vc, animated: true) - case .support: - helpLauncher.launch() case .reserveUsername: coordinate(to: CreateUsernameCoordinator(navigationOption: .settings(parent: navigationController))) .sink { [unowned self] in diff --git a/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeChangeCoordinator.swift b/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeChangeCoordinator.swift index 833aa3795b..ef3317f9e1 100644 --- a/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeChangeCoordinator.swift +++ b/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeChangeCoordinator.swift @@ -7,7 +7,6 @@ class PincodeChangeCoordinator: Coordinator { private let transition = PanelTransition() @Injected private var pincodeStorage: PincodeStorageType - @Injected private var helpLauncher: HelpCenterLauncher let result = PassthroughSubject() init(navVC: UINavigationController) { @@ -52,11 +51,6 @@ class PincodeChangeCoordinator: Coordinator { viewController.modalPresentationStyle = .custom self.navVC.present(viewController, animated: true) } - view.help - .sink(receiveValue: { [unowned self] in - helpLauncher.launch() - }) - .store(in: &subscriptions) let vc = UIHostingController(rootView: view) vc.title = L10n.changePIN diff --git a/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeVerifyView.swift b/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeVerifyView.swift index b6be5591f2..c4e1fb9491 100644 --- a/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeVerifyView.swift +++ b/p2p_wallet/Scenes/Main/NewSettings/Subscenes/PincodeChange/PincodeVerifyView.swift @@ -8,8 +8,6 @@ struct PincodeVerifyView: View { @Injected private var pincodeStorage: PincodeStorageType var onSuccess: (() -> Void)? var forgetPinCode: (() -> Void)? - private let helpSubject = PassthroughSubject() - var help: AnyPublisher { helpSubject.eraseToAnyPublisher() } var body: some View { VStack { @@ -59,15 +57,6 @@ struct PincodeVerifyView: View { .padding(.top, 24) } } - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - Button { - helpSubject.send() - } label: { - Image(.helpOutline) - } - } - } .padding(.top, safeAreaInsets.top + 50) .padding(.bottom, 54) .background(Color(.rain)) diff --git a/p2p_wallet/Scenes/TabBar/TabBarController.swift b/p2p_wallet/Scenes/TabBar/TabBarController.swift index 93dc8912e2..ebc2b7e87e 100644 --- a/p2p_wallet/Scenes/TabBar/TabBarController.swift +++ b/p2p_wallet/Scenes/TabBar/TabBarController.swift @@ -1,6 +1,5 @@ import AnalyticsManager import Combine -import Intercom import Onboarding import Resolver import Sell @@ -11,7 +10,6 @@ final class TabBarController: UITabBarController { // MARK: - Dependencies @Injected private var analyticsManager: AnalyticsManager - @Injected private var helpLauncher: HelpCenterLauncher @Injected private var solanaTracker: SolanaTracker @Injected private var deviceShareMigration: DeviceShareMigrationService @@ -186,12 +184,6 @@ final class TabBarController: UITabBarController { } .store(in: &subscriptions) - pincodeViewModel.infoDidTap - .sink(receiveValue: { [unowned self] in - helpLauncher.launch() - }) - .store(in: &subscriptions) - localAuthVC?.onClose = { [weak self] in self?.viewModel.authenticate(presentationStyle: nil) if authSuccess == false { @@ -261,15 +253,6 @@ final class TabBarController: UITabBarController { }) .store(in: &subscriptions) - viewModel.moveToIntercomSurvey - .sink { id in - guard !id.isEmpty else { return } - DispatchQueue.main.asyncAfter(deadline: .now() + 1) { - Intercom.presentSurvey(id) - } - } - .store(in: &subscriptions) - // locking status viewModel.isLockedPublisher .sink(receiveValue: { [weak self] isLocked in diff --git a/p2p_wallet/Scenes/TabBar/TabBarViewModel.swift b/p2p_wallet/Scenes/TabBar/TabBarViewModel.swift index 7330664c2a..ce984283af 100644 --- a/p2p_wallet/Scenes/TabBar/TabBarViewModel.swift +++ b/p2p_wallet/Scenes/TabBar/TabBarViewModel.swift @@ -114,31 +114,6 @@ extension TabBarViewModel { .eraseToAnyPublisher() } - var moveToIntercomSurvey: AnyPublisher { - Publishers.Merge( - authenticationHandler - .isLockedPublisher - .filter { value in - GlobalAppState.shared.surveyID != nil && value == false - } - .map { _ in () }, - - viewDidLoad - .filter { [weak self] in - self?.notificationService.showFromLaunch == true - } - ) - .map { _ in () } - .map { - GlobalAppState.shared.surveyID ?? "" - } - .handleEvents(receiveOutput: { _ in - GlobalAppState.shared.surveyID = nil - }) - .receive(on: DispatchQueue.main) - .eraseToAnyPublisher() - } - var moveToSendViaLinkClaim: AnyPublisher { Publishers.CombineLatest( authenticationStatusPublisher, diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewController.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewController.swift index d359d1756c..cf5bfcb81e 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewController.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewController.swift @@ -134,7 +134,6 @@ final class PincodeViewController: BaseViewController { private func setupNavBar() { addLeftButton() - addRightButton() } private func addLeftButton() { @@ -164,23 +163,6 @@ final class PincodeViewController: BaseViewController { viewModel.back.send() } - private func addRightButton() { - let infoButton = UIButton() - infoButton.addTarget(self, action: #selector(openInfo), for: .touchUpInside) - infoButton.setImage(.init(resource: .helpOutline), for: .normal) - infoButton.contentMode = .scaleAspectFill - if navigationController != nil { - navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton) - } else { - view.addSubview(infoButton) - infoButton.autoPinToTopRightCornerOfSuperviewSafeArea(xInset: 17, yInset: 3) - } - } - - @objc private func openInfo() { - viewModel.infoDidTap.send() - } - private var transition: PanelTransition? private var forgetPinViewController: UIViewController? private func openForgotPIN( diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewModel.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewModel.swift index 40cdd4b938..8f7b600a5b 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewModel.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/Pincode/PincodeViewModel.swift @@ -28,7 +28,6 @@ final class PincodeViewModel: BaseViewModel, ObservableObject { @Published var showForgotModal: Bool = false let back = PassthroughSubject() - let infoDidTap = PassthroughSubject() let pincodeSuccess = PassthroughSubject() let pincodeFailed = PassthroughSubject() diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/SecuritySetupDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/SecuritySetupDelegatedCoordinator.swift index 7ceb7856ea..8d11873be1 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/SecuritySetupDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/Common/Pincode/SecuritySetupDelegatedCoordinator.swift @@ -5,7 +5,6 @@ import SwiftUI import UIKit final class SecuritySetupDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher override func buildViewController(for state: SecuritySetupState) -> UIViewController? { switch state { @@ -22,12 +21,6 @@ final class SecuritySetupDelegatedCoordinator: DelegatedCoordinator, Never> = .init() - let outInfo: PassthroughSubject = .init() let outLogin: PassthroughSubject, Never> = .init() init(parameters: SocialSignInParameters) { @@ -42,11 +41,6 @@ final class SocialSignInViewModel: BaseViewModel, ObservableObject { super.init() } - func onInfo() { - guard loading == nil else { return } - outInfo.send() - } - func onBack() { guard loading == nil else { return } outBack.sendProcess() diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/EnterPhoneNumber/BindingPhoneNumberDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/EnterPhoneNumber/BindingPhoneNumberDelegatedCoordinator.swift index f58cc8139a..7807093c35 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/EnterPhoneNumber/BindingPhoneNumberDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/EnterPhoneNumber/BindingPhoneNumberDelegatedCoordinator.swift @@ -7,7 +7,6 @@ import Resolver import SwiftUI class BindingPhoneNumberDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher @Injected private var analyticsManager: AnalyticsManager override func buildViewController(for state: BindingPhoneNumberState) -> UIViewController? { @@ -32,12 +31,6 @@ class BindingPhoneNumberDelegatedCoordinator: DelegatedCoordinator() private var continueButtonRef = BERef() - private var disableRightButton: Bool - var store = Set() - init(viewModel: EnterSMSCodeViewModel, disableRightButton: Bool = false) { + init(viewModel: EnterSMSCodeViewModel) { self.viewModel = viewModel - self.disableRightButton = disableRightButton super.init() } @@ -166,26 +163,12 @@ final class EnterSMSCodeViewController: BaseOTPViewController { ) backButton.tintColor = .init(resource: .night) navigationItem.leftBarButtonItem = backButton - - if !disableRightButton { - // Right button - let infoButton = UIButton() - infoButton.addTarget(self, action: #selector(onInfo), for: .touchUpInside) - infoButton.setImage(.init(resource: .helpOutline), for: .normal) - infoButton.contentMode = .scaleAspectFill - infoButton.tintColor = .init(resource: .night) - navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton) - } } @objc func onBack() { viewModel.backTapped() } - @objc func onInfo() { - viewModel.infoTapped() - } - private func openKeyboard() { smsInputRef.view?.textField?.becomeFirstResponder() } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInAccountHasBeenUsed/SocialSignInAccountHasBeenUsedView.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInAccountHasBeenUsed/SocialSignInAccountHasBeenUsedView.swift index dc32ad1715..a762c5dc5f 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInAccountHasBeenUsed/SocialSignInAccountHasBeenUsedView.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInAccountHasBeenUsed/SocialSignInAccountHasBeenUsedView.swift @@ -46,8 +46,7 @@ struct SocialSignInAccountHasBeenUsedView: View { } .onboardingNavigationBar( title: L10n.stepOf("1", "3"), - onBack: { [weak viewModel] in viewModel?.back() }, - onInfo: { [weak viewModel] in viewModel?.info() } + onBack: { [weak viewModel] in viewModel?.back() } ) .modifier(OnboardingScreen()) } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInDelegatedCoordiantor.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInDelegatedCoordiantor.swift index b3724c90db..28f70082ff 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInDelegatedCoordiantor.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/CreateWallet/Steps/SocialSignIn/SocialSignInDelegatedCoordiantor.swift @@ -6,7 +6,6 @@ import Resolver import SwiftUI class SocialSignInDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher @Injected private var analyticsManager: AnalyticsManager override func buildViewController(for state: SocialSignInState) -> UIViewController? { @@ -16,8 +15,6 @@ class SocialSignInDelegatedCoordinator: DelegatedCoordinator let vm = SocialSignInViewModel(parameters: socialSignInParameters()) let vc = SocialSignInView(viewModel: vm) - vc.viewModel.outInfo.sink { [weak self] in self?.openInfo() } - .store(in: &subscriptions) vc.viewModel.outBack.sinkAsync { [stateMachine] process in process.start { try await stateMachine <- .signInBack } @@ -99,10 +96,6 @@ class SocialSignInDelegatedCoordinator: DelegatedCoordinator } } - func openInfo() { - helpLauncher.launch() - } - private func socialSignInParameters() -> SocialSignInParameters { let content = OnboardingContentData( image: .easyToStart, diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/RestoreWalletCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/RestoreWalletCoordinator.swift index 27b725b84e..7fd9d5aeaa 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/RestoreWalletCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/RestoreWalletCoordinator.swift @@ -11,7 +11,6 @@ enum RestoreWalletNavigation { } final class RestoreWalletCoordinator: Coordinator { - @Injected private var helpLauncher: HelpCenterLauncher @Injected private var analyticsManager: AnalyticsManager private let navigationController: OnboardingNavigationController @@ -182,10 +181,6 @@ final class RestoreWalletCoordinator: Coordinator { } } - @objc private func openInfo() { - helpLauncher.launch() - } - private func isBackAvailable() -> Bool { switch navigation { case .root: @@ -222,10 +217,6 @@ private extension RestoreWalletCoordinator { _ = try await stateMachine <- .start } .store(in: &subscriptions) - chooseRestoreOptionViewModel.openInfo.sink { [weak self] in - self?.openInfo() - } - .store(in: &subscriptions) chooseRestoreOptionViewModel.back.sinkAsync { _ = try await stateMachine <- .back } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ChooseRestoreOption/ChooseRestoreOptionView.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ChooseRestoreOption/ChooseRestoreOptionView.swift index 3f0083c2c6..fc989e38e8 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ChooseRestoreOption/ChooseRestoreOptionView.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ChooseRestoreOption/ChooseRestoreOptionView.swift @@ -23,8 +23,7 @@ struct ChooseRestoreOptionView: View { } .onboardingNavigationBar( title: L10n.restoreYourWallet, - onBack: viewModel.isBackAvailable ? { [weak viewModel] in viewModel?.back.send() } : nil, - onInfo: { [weak viewModel] in viewModel?.openInfo.send() } + onBack: viewModel.isBackAvailable ? { [weak viewModel] in viewModel?.back.send() } : nil ) } } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/ICloudRestore/ICloudRestoreScreen.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/ICloudRestore/ICloudRestoreScreen.swift index 81023ab31c..7437ab293f 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/ICloudRestore/ICloudRestoreScreen.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/ICloudRestore/ICloudRestoreScreen.swift @@ -13,8 +13,6 @@ struct ICloudRestoreScreen: View { } .onboardingNavigationBar(title: L10n.restoreYourWallet, onBack: { [weak viewModel] in viewModel?.backPressed() - }, onInfo: { [weak viewModel] in - viewModel?.infoPressed() }) .background(Color(.lime)) .edgesIgnoringSafeArea(.all) diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/RestoreICloudDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/RestoreICloudDelegatedCoordinator.swift index d294162e06..116a705013 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/RestoreICloudDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/ICloudRestore/RestoreICloudDelegatedCoordinator.swift @@ -4,8 +4,6 @@ import Resolver import SwiftUI final class RestoreICloudDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher - override func buildViewController(for state: RestoreICloudState) -> UIViewController? { switch state { case .signIn: @@ -16,10 +14,6 @@ final class RestoreICloudDelegatedCoordinator: DelegatedCoordinator { @Injected private var analyticsManager: AnalyticsManager - @Injected private var helpLauncher: HelpCenterLauncher override func buildViewController(for state: RestoreCustomState) -> UIViewController? { switch state { @@ -46,10 +45,6 @@ final class RestoreCustomDelegatedCoordinator: DelegatedCoordinator UIViewController { let view = OnboardingBrokenScreen(title: "", contentData: content, back: { [stateMachine] in Task { _ = try await stateMachine <- .start } - }, info: { [weak self] in - self?.openHelp() - }, help: { [weak self] in - self?.openHelp() }) return UIHostingController(rootView: view) } @@ -282,10 +258,6 @@ private extension RestoreCustomDelegatedCoordinator { _ = try await stateMachine <- .start } .store(in: &subscriptions) - viewModel.openInfo.sink { [weak self] in - self?.openHelp() - } - .store(in: &subscriptions) return UIHostingController(rootView: ChooseRestoreOptionView(viewModel: viewModel)) } else { @@ -296,9 +268,7 @@ private extension RestoreCustomDelegatedCoordinator { ) let view = OnboardingBrokenScreen(title: "", contentData: content, back: { [stateMachine] in Task { _ = try await stateMachine <- .start } - }, info: { [weak self] in - self?.openHelp() - }, help: nil, + }, customActions: { TextButtonView(title: L10n.useAnAnotherPhone, style: .inverted, size: .large) @@ -336,8 +306,7 @@ private extension RestoreCustomDelegatedCoordinator { Task { _ = try await stateMachine <- .enterPhone } }, onTermsOfService: { [weak self] in self?.openTermsOfService() }, - onPrivacyPolicy: { [weak self] in self?.openPrivacyPolicy() }, - onInfo: { [weak self] in self?.openHelp() } + onPrivacyPolicy: { [weak self] in self?.openPrivacyPolicy() } ) return UIHostingController(rootView: view) } @@ -357,8 +326,6 @@ private extension RestoreCustomDelegatedCoordinator { let actionView = RestoreSocialOptionView(viewModel: actionViewModel) let view = OnboardingBrokenScreen(title: "", contentData: content, back: { [stateMachine] in Task { _ = try await stateMachine <- .start } - }, info: { [weak self] in - self?.openHelp() }, customActions: { actionView }) return UIHostingController(rootView: view) } @@ -394,10 +361,6 @@ private extension RestoreCustomDelegatedCoordinator { _ = try await stateMachine <- .start } .store(in: &subscriptions) - chooseRestoreOptionViewModel.openInfo.sink { [weak self] in - self?.openHelp() - } - .store(in: &subscriptions) return UIHostingController(rootView: ChooseRestoreOptionView(viewModel: chooseRestoreOptionViewModel)) } } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/RestoreSocial/RestoreSocialDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/RestoreSocial/RestoreSocialDelegatedCoordinator.swift index b70a769619..eebe0bc229 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/RestoreSocial/RestoreSocialDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/RestoreSocial/RestoreSocialDelegatedCoordinator.swift @@ -4,8 +4,6 @@ import Resolver import SwiftUI final class RestoreSocialDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher - override func buildViewController(for state: RestoreSocialState) -> UIViewController? { switch state { case .signIn: @@ -41,10 +39,6 @@ final class RestoreSocialDelegatedCoordinator: DelegatedCoordinator SocialSignInParameters { let content = OnboardingContentData(image: .easyToStart, title: L10n.howToContinue) let parameters = SocialSignInParameters( @@ -62,8 +56,6 @@ private extension RestoreSocialDelegatedCoordinator { func handleSocial() -> UIViewController { let viewModel = SocialSignInViewModel(parameters: socialSignInParameters()) let view = SocialSignInView(viewModel: viewModel) - viewModel.outInfo.sink { [weak self] in self?.openInfo() } - .store(in: &subscriptions) viewModel.outLogin.sinkAsync { [stateMachine] process in process.start { @@ -101,10 +93,6 @@ private extension RestoreSocialDelegatedCoordinator { _ = try await stateMachine <- .start } .store(in: &subscriptions) - chooseRestoreOptionViewModel.openInfo.sink { [weak self] in - self?.openInfo() - } - .store(in: &subscriptions) chooseRestoreOptionViewModel.back.sinkAsync { [stateMachine] in _ = try await stateMachine <- .back } @@ -130,8 +118,6 @@ private extension RestoreSocialDelegatedCoordinator { let actionView = RestoreSocialOptionView(viewModel: actionViewModel) let view = OnboardingBrokenScreen(title: "", contentData: content, back: { [stateMachine] in Task { _ = try await stateMachine <- .start } - }, info: { [weak self] in - self?.openInfo() }, customActions: { actionView }) return UIHostingController(rootView: view) } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/SeedPhraseRestore/RestoreSeedPhraseDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/SeedPhraseRestore/RestoreSeedPhraseDelegatedCoordinator.swift index ae44648922..86e1777bbd 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/SeedPhraseRestore/RestoreSeedPhraseDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/RestoreWallet/Steps/SeedPhraseRestore/RestoreSeedPhraseDelegatedCoordinator.swift @@ -4,8 +4,6 @@ import Resolver import SwiftUI final class RestoreSeedPhraseDelegatedCoordinator: DelegatedCoordinator { - @Injected private var helpLauncher: HelpCenterLauncher - override func buildViewController(for state: RestoreSeedState) -> UIViewController? { switch state { case .signInSeed: @@ -16,10 +14,6 @@ final class RestoreSeedPhraseDelegatedCoordinator: DelegatedCoordinator Void)? let onTermsOfService: () -> Void let onPrivacyPolicy: () -> Void - let onInfo: (() -> Void)? let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() @@ -67,7 +66,7 @@ struct OnboardingBlockScreen: View { } .background(Color(.lime)) .ignoresSafeArea() - .onboardingNavigationBar(title: "", onInfo: onInfo) + .onboardingNavigationBar(title: "") } private let formatter: DateComponentsFormatter = { @@ -96,6 +95,6 @@ struct OnboardingBlockScreen_Previews: PreviewProvider { primaryButtonAction: "Recovery Kit", contentTitle: L10n.soLetSBreathe, contentSubtitle: { (_: Any) in L10n.YouVeUsedAll5Codes.TryAgainLater.forHelpContactSupport } - ) {} onCompletion: {} onTermsOfService: {} onPrivacyPolicy: {} onInfo: {} + ) {} onCompletion: {} onTermsOfService: {} onPrivacyPolicy: {} } } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/Screen/OnboardingBrokenScreen.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/Screen/OnboardingBrokenScreen.swift index 2336695beb..cbce2b1939 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/Screen/OnboardingBrokenScreen.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/Screen/OnboardingBrokenScreen.swift @@ -6,8 +6,6 @@ struct OnboardingBrokenScreen: View { let contentData: OnboardingContentData let back: (() async throws -> Void)? - let info: (() -> Void)? - let help: (() -> Void)? @ViewBuilder var customActions: CustomActions @@ -17,15 +15,11 @@ struct OnboardingBrokenScreen: View { title: String, contentData: OnboardingContentData, back: (() async throws -> Void)? = nil, - info: (() -> Void)? = nil, - help: (() -> Void)? = nil, @ViewBuilder customActions: () -> CustomActions ) { self.title = title self.contentData = contentData self.back = back - self.info = info - self.help = help self.customActions = customActions() } @@ -41,17 +35,6 @@ struct OnboardingBrokenScreen: View { VStack { customActions - if let help = help { - TextButtonView( - title: L10n.support, - style: .inverted, - size: .large, - leading: UIImage(resource: .newReleasesOutlined), - onPressed: { help() } - ) - .frame(height: TextButton.Size.large.height) - } - if let back = back { TextButtonView( title: L10n.startingScreen, @@ -74,8 +57,7 @@ struct OnboardingBrokenScreen: View { } .onboardingNavigationBar( title: title, - onBack: nil, - onInfo: info != nil ? { info!() } : nil + onBack: nil ) .modifier(OnboardingScreen()) } @@ -86,15 +68,12 @@ extension OnboardingBrokenScreen where CustomActions == SwiftUI.EmptyView { title: String, contentData: OnboardingContentData, back: (() async throws -> Void)? = nil, - info: (() -> Void)? = nil, - help: (() -> Void)? = nil + help _: (() -> Void)? = nil ) { self.init( title: title, contentData: contentData, back: back, - info: info, - help: help, customActions: { SwiftUI.EmptyView() } ) } @@ -110,9 +89,7 @@ struct OnboardingBrokenScreen_Previews: PreviewProvider { title: L10n.easyToStart, subtitle: L10n.createYourAccountIn1Minute ), - back: {}, - info: {}, - help: {} + back: {} ) } } diff --git a/p2p_wallet/Scenes/Web3Auth/Onboarding/View/OnboardingNavigationBar.swift b/p2p_wallet/Scenes/Web3Auth/Onboarding/View/OnboardingNavigationBar.swift index 357e51c972..f65d719b81 100644 --- a/p2p_wallet/Scenes/Web3Auth/Onboarding/View/OnboardingNavigationBar.swift +++ b/p2p_wallet/Scenes/Web3Auth/Onboarding/View/OnboardingNavigationBar.swift @@ -3,8 +3,7 @@ import SwiftUI extension View { func onboardingNavigationBar( title: String, - onBack: (() -> Void)? = nil, - onInfo: (() -> Void)? = nil + onBack: (() -> Void)? = nil ) -> some View { navigationTitle(title) .navigationBarTitleDisplayMode(.inline) @@ -15,13 +14,6 @@ extension View { Image(.arrowBackIos) .foregroundColor(Color(.night)) } - ) : nil, - trailing: onInfo != nil ? Button( - action: { onInfo?() }, - label: { - Image(.helpOutline) - .foregroundColor(Color(.night)) - } ) : nil ) } diff --git a/p2p_wallet/Scenes/Web3Auth/Reauthentication/SubFlow/CustomShare/ReAuthCustomShareDelegatedCoordinator.swift b/p2p_wallet/Scenes/Web3Auth/Reauthentication/SubFlow/CustomShare/ReAuthCustomShareDelegatedCoordinator.swift index 4ef1aadd64..842703a271 100644 --- a/p2p_wallet/Scenes/Web3Auth/Reauthentication/SubFlow/CustomShare/ReAuthCustomShareDelegatedCoordinator.swift +++ b/p2p_wallet/Scenes/Web3Auth/Reauthentication/SubFlow/CustomShare/ReAuthCustomShareDelegatedCoordinator.swift @@ -12,7 +12,7 @@ class ReAuthCustomShareDelegatedCoordinator: DelegatedCoordinator