From ff313dd53fe46a4d1e2e0d8b804617bd15c944c6 Mon Sep 17 00:00:00 2001 From: Radek Novak Date: Mon, 22 Jan 2024 19:39:29 +0100 Subject: [PATCH] pr feedback --- Example/DApp/Modules/Sign/SignPresenter.swift | 10 ++++------ .../Screens/WalletDetail/WalletDetailViewModel.swift | 9 +-------- .../WalletConnectModal/Modal/Screens/WalletList.swift | 4 ++-- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/Example/DApp/Modules/Sign/SignPresenter.swift b/Example/DApp/Modules/Sign/SignPresenter.swift index 896f50442..e96791894 100644 --- a/Example/DApp/Modules/Sign/SignPresenter.swift +++ b/Example/DApp/Modules/Sign/SignPresenter.swift @@ -54,12 +54,10 @@ final class SignPresenter: ObservableObject { } func connectWalletWithWCM() { - Task { - WalletConnectModal.set(sessionParams: .init( - requiredNamespaces: Proposal.requiredNamespaces, - optionalNamespaces: Proposal.optionalNamespaces - )) - } + WalletConnectModal.set(sessionParams: .init( + requiredNamespaces: Proposal.requiredNamespaces, + optionalNamespaces: Proposal.optionalNamespaces + )) WalletConnectModal.present(from: nil) } diff --git a/Sources/WalletConnectModal/Modal/Screens/WalletDetail/WalletDetailViewModel.swift b/Sources/WalletConnectModal/Modal/Screens/WalletDetail/WalletDetailViewModel.swift index 96d5519d3..f1ee61ac5 100644 --- a/Sources/WalletConnectModal/Modal/Screens/WalletDetail/WalletDetailViewModel.swift +++ b/Sources/WalletConnectModal/Modal/Screens/WalletDetail/WalletDetailViewModel.swift @@ -35,15 +35,8 @@ final class WalletDetailViewModel: ObservableObject { func handle(_ event: Event) { switch event { - case .onAppear: + case .onAppear, .didTapUniversalLink, .didTapTryAgain: deeplinkToWallet() - - case .didTapUniversalLink: - deeplinkToWallet() - - case .didTapTryAgain: - deeplinkToWallet() - case .didTapAppStore: deeplinkHandler.openAppstore(wallet: wallet) } diff --git a/Sources/WalletConnectModal/Modal/Screens/WalletList.swift b/Sources/WalletConnectModal/Modal/Screens/WalletList.swift index 7d4b58f0e..96efd6a13 100644 --- a/Sources/WalletConnectModal/Modal/Screens/WalletList.swift +++ b/Sources/WalletConnectModal/Modal/Screens/WalletList.swift @@ -33,11 +33,11 @@ struct WalletList: View { // iOS 14 doesn't have extra separators below the list by default. } else { // To remove only extra separators below the list: - UITableView.appearance().tableFooterView = UIView() + UITableView.appearance(whenContainedInInstancesOf: [WalletConnectModalSheetController.self]).tableFooterView = UIView() } // To remove all separators including the actual ones: - UITableView.appearance().separatorStyle = .none + UITableView.appearance(whenContainedInInstancesOf: [WalletConnectModalSheetController.self]).separatorStyle = .none } var body: some View {