diff --git a/novawallet/Common/IconRetrieve/KingfisherIconRetrieveOperationFactory.swift b/novawallet/Common/IconRetrieve/KingfisherIconRetrieveOperationFactory.swift index afffceeb0..11088080d 100644 --- a/novawallet/Common/IconRetrieve/KingfisherIconRetrieveOperationFactory.swift +++ b/novawallet/Common/IconRetrieve/KingfisherIconRetrieveOperationFactory.swift @@ -61,8 +61,6 @@ extension KingfisherIconRetrieveOperationFactory: IconRetrieveOperationFactoryPr return } - let sizeBeforeProcessing = resultImage.size - if case .remoteTransparent = iconInfo.type { resultImage = resultImage.redrawWithBackground( color: R.color.colorTextPrimaryOnWhite()!, diff --git a/novawallet/Common/QRCreation/Logo/QRCodeWithLogoFactory.swift b/novawallet/Common/QRCreation/Logo/QRCodeWithLogoFactory.swift index 0cf716db1..508f88eeb 100644 --- a/novawallet/Common/QRCreation/Logo/QRCodeWithLogoFactory.swift +++ b/novawallet/Common/QRCreation/Logo/QRCodeWithLogoFactory.swift @@ -91,7 +91,7 @@ private extension QRCodeWithLogoFactory { qrSize: CGSize, partialResultClosure: @escaping (Result) -> Void ) -> CompoundOperationWrapper { - var checkCacheOperation = checkCacheOperation(using: logoInfo) + let checkCacheOperation = checkCacheOperation(using: logoInfo) let wrapper: CompoundOperationWrapper = OperationCombiningService.compoundNonOptionalWrapper( operationManager: OperationManager(operationQueue: operationQueue) diff --git a/novawallet/Modules/AssetDetails/View/AssetDetailsViewLayout.swift b/novawallet/Modules/AssetDetails/View/AssetDetailsViewLayout.swift index 37a5628d7..835b7ec8d 100644 --- a/novawallet/Modules/AssetDetails/View/AssetDetailsViewLayout.swift +++ b/novawallet/Modules/AssetDetails/View/AssetDetailsViewLayout.swift @@ -91,10 +91,7 @@ final class AssetDetailsViewLayout: UIView { } private func setupLayout() { - balanceTableView.addArrangedSubview(headerCell) - balanceTableView.addArrangedSubview(totalCell) - balanceTableView.addArrangedSubview(transferrableCell) - balanceTableView.addArrangedSubview(lockCell) + setupBalanceTableViewLayout() addSubview(backgroundView) backgroundView.snp.makeConstraints { @@ -143,7 +140,6 @@ final class AssetDetailsViewLayout: UIView { $0.leading.greaterThanOrEqualTo(assetView.snp.trailing).offset(8) $0.centerY.equalTo(assetView.snp.centerY) } - addSubview(containerView) containerView.snp.makeConstraints { $0.leading.trailing.bottom.equalToSuperview() @@ -155,6 +151,13 @@ final class AssetDetailsViewLayout: UIView { containerView.stackView.addArrangedSubview(buttonsRow) } + private func setupBalanceTableViewLayout() { + balanceTableView.addArrangedSubview(headerCell) + balanceTableView.addArrangedSubview(totalCell) + balanceTableView.addArrangedSubview(transferrableCell) + balanceTableView.addArrangedSubview(lockCell) + } + func set(locale: Locale) { let languages = locale.rLanguages diff --git a/novawallet/Modules/AssetList/AssetListPresenter.swift b/novawallet/Modules/AssetList/AssetListPresenter.swift index 3289b6ad1..fdc9dac6f 100644 --- a/novawallet/Modules/AssetList/AssetListPresenter.swift +++ b/novawallet/Modules/AssetList/AssetListPresenter.swift @@ -42,8 +42,12 @@ final class AssetListPresenter { self.localizationManager = localizationManager self.appearanceFacade = appearanceFacade } +} + +// MARK: Private - private func providePolkadotStakingPromotion() { +private extension AssetListPresenter { + func providePolkadotStakingPromotion() { guard shouldShowPolkadotPromotion else { return } @@ -53,7 +57,7 @@ final class AssetListPresenter { view?.didReceivePromotion(viewModel: viewModel) } - private func provideHeaderViewModel() { + func provideHeaderViewModel() { guard let walletType = walletType, let name = name else { return } @@ -87,7 +91,7 @@ final class AssetListPresenter { ) } - private func createAssetAccountPrice( + func createAssetAccountPrice( chainAssetId: ChainAssetId, priceData: PriceData ) -> Either? { @@ -117,7 +121,7 @@ final class AssetListPresenter { )) } - private func createAssetAccountPriceLock( + func createAssetAccountPriceLock( chainAssetId: ChainAssetId, priceData: PriceData ) -> AssetListAssetAccountPrice? { @@ -140,7 +144,7 @@ final class AssetListPresenter { ) } - private func provideHeaderViewModel( + func provideHeaderViewModel( with priceMapping: [ChainAssetId: PriceData], walletIdenticon: Data?, walletType: MetaAccountModelType, @@ -169,7 +173,7 @@ final class AssetListPresenter { view?.didReceiveHeader(viewModel: viewModel) } - private func createHeaderPriceState( + func createHeaderPriceState( from priceMapping: [ChainAssetId: PriceData], externalBalances: [AssetListAssetAccountPrice] ) -> LoadableViewModelState<[AssetListAssetAccountPrice]> { @@ -209,7 +213,7 @@ final class AssetListPresenter { return priceState + externalBalances } - private func createHeaderLockState( + func createHeaderLockState( from priceMapping: [ChainAssetId: PriceData], externalBalances: [AssetListAssetAccountPrice] ) -> [AssetListAssetAccountPrice]? { @@ -226,7 +230,7 @@ final class AssetListPresenter { return locks + externalBalances } - private func checkNonZeroLocks() -> Bool { + func checkNonZeroLocks() -> Bool { let locks = model.balances.map { (try? $0.value.get())?.locked ?? 0 } if locks.contains(where: { $0 > 0 }) { @@ -242,7 +246,7 @@ final class AssetListPresenter { return false } - private func provideAssetViewModels() { + func provideAssetViewModels() { guard let hidesZeroBalances, let assetListStyle else { return } @@ -266,7 +270,7 @@ final class AssetListPresenter { } } - private func externalBalanceModel(prices: [ChainAssetId: PriceData]) -> [AssetListAssetAccountPrice] { + func externalBalanceModel(prices: [ChainAssetId: PriceData]) -> [AssetListAssetAccountPrice] { switch model.externalBalanceResult { case .failure, .none: return [] @@ -296,7 +300,7 @@ final class AssetListPresenter { } } - private func createGroupViewModels() -> [AssetListGroupType] { + func createGroupViewModels() -> [AssetListGroupType] { guard let hidesZeroBalances, let assetListStyle else { return [] } @@ -323,7 +327,7 @@ final class AssetListPresenter { } } - private func filterZeroBalances(_ assets: [AssetListAssetModel]) -> [AssetListAssetModel] { + func filterZeroBalances(_ assets: [AssetListAssetModel]) -> [AssetListAssetModel] { let filteredAssets: [AssetListAssetModel] filteredAssets = assets.filter { asset in @@ -337,7 +341,7 @@ final class AssetListPresenter { return filteredAssets } - private func createAssetGroupViewModel( + func createAssetGroupViewModel( from groupModel: AssetListAssetGroupModel, maybePrices: [ChainAssetId: PriceData]?, hidesZeroBalances: Bool @@ -365,7 +369,7 @@ final class AssetListPresenter { } } - private func createNetworkGroupViewModel( + func createNetworkGroupViewModel( from groupModel: AssetListChainGroupModel, maybePrices: [ChainAssetId: PriceData]?, hidesZeroBalances: Bool @@ -401,7 +405,7 @@ final class AssetListPresenter { ) } - private func provideNftViewModel() { + func provideNftViewModel() { guard !model.nfts.isEmpty else { view?.didReceiveNft(viewModel: nil) return @@ -411,20 +415,20 @@ final class AssetListPresenter { view?.didReceiveNft(viewModel: nftViewModel) } - private func updateAssetsView() { + func updateAssetsView() { provideHeaderViewModel() provideAssetViewModels() } - private func updateHeaderView() { + func updateHeaderView() { provideHeaderViewModel() } - private func updateNftView() { + func updateNftView() { provideNftViewModel() } - private func presentAssetDetails(for chainAssetId: ChainAssetId) { + func presentAssetDetails(for chainAssetId: ChainAssetId) { // get chain from interactor that includes also disabled assets let optChain = interactor.getFullChain(for: chainAssetId.chainId) ?? model.allChains[chainAssetId.chainId] @@ -438,6 +442,8 @@ final class AssetListPresenter { } } +// MARK: AssetListPresenterProtocol + extension AssetListPresenter: AssetListPresenterProtocol { func setup() { interactor.setup() @@ -556,6 +562,8 @@ extension AssetListPresenter: AssetListPresenterProtocol { } } +// MARK: AssetListInteractorOutputProtocol + extension AssetListPresenter: AssetListInteractorOutputProtocol { func didReceive(result: AssetListBuilderResult) { guard result.walletId != nil, result.walletId == walletId else { @@ -638,6 +646,8 @@ extension AssetListPresenter: AssetListInteractorOutputProtocol { } } +// MARK: Localizable + extension AssetListPresenter: Localizable { func applyLocalization() { if let view = view, view.isSetup { diff --git a/novawallet/Modules/AssetList/Models/AssetListAssetModelComparator.swift b/novawallet/Modules/AssetList/Models/AssetListAssetModelComparator.swift index aa59e5130..481633ede 100644 --- a/novawallet/Modules/AssetList/Models/AssetListAssetModelComparator.swift +++ b/novawallet/Modules/AssetList/Models/AssetListAssetModelComparator.swift @@ -28,7 +28,7 @@ enum AssetListAssetModelComparator { return nil } } - + static func byChain( lhs: AssetListAssetModel, rhs: AssetListAssetModel diff --git a/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionManager.swift b/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionManager.swift index 90b3e52d0..fea90ab49 100644 --- a/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionManager.swift +++ b/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionManager.swift @@ -17,6 +17,7 @@ final class AssetListCollectionManager { private var promotionBannerViewModel: PromotionBannerView.ViewModel? private let collectionViewDataSource: AssetListCollectionViewDataSource + // swiftlint:disable weak_delegate private let collectionViewDelegate: AssetListCollectionViewDelegate init( diff --git a/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionViewDataSource.swift b/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionViewDataSource.swift index b4f2254bd..273609d3b 100644 --- a/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionViewDataSource.swift +++ b/novawallet/Modules/AssetList/View/AssetListCollectionManager/AssetListCollectionViewDataSource.swift @@ -113,13 +113,11 @@ private extension AssetListCollectionViewDataSource { action: #selector(actionManage), for: .touchUpInside ) - settingsCell.searchButton.addTarget( self, action: #selector(actionSearch), for: .touchUpInside ) - settingsCell.styleSwitcher.addTarget( self, action: #selector(actionSwitchStyle), diff --git a/novawallet/Modules/AssetList/View/AssetListStyleSwitcher/AssetListStyleSwitcherView.swift b/novawallet/Modules/AssetList/View/AssetListStyleSwitcher/AssetListStyleSwitcherView.swift index 1a214e837..9f64c82f6 100644 --- a/novawallet/Modules/AssetList/View/AssetListStyleSwitcher/AssetListStyleSwitcherView.swift +++ b/novawallet/Modules/AssetList/View/AssetListStyleSwitcher/AssetListStyleSwitcherView.swift @@ -191,7 +191,7 @@ private extension AssetListStyleSwitcherView { newText: R.string.localizable.commonTokens( preferredLanguages: locale.rLanguages ), - direction: .up + direction: .top ) animateIndicators( squareColor: Constants.indicatorInactiveColor, @@ -204,7 +204,7 @@ private extension AssetListStyleSwitcherView { newText: R.string.localizable.commonNetworks( preferredLanguages: locale.rLanguages ), - direction: .down + direction: .bottom ) animateIndicators( squareColor: Constants.indicatorActiveColor, @@ -357,13 +357,13 @@ private extension AssetListStyleSwitcherView { private extension AssetListStyleSwitcherView { enum AnimationDirection { - case up - case down + case top + case bottom var yOffset: CGFloat { switch self { - case .up: return -1 - case .down: return 1 + case .top: return -1 + case .bottom: return 1 } } } diff --git a/novawallet/Modules/AssetList/View/AssetListTotalBalanceCell.swift b/novawallet/Modules/AssetList/View/AssetListTotalBalanceCell.swift index 20905c38d..e6c434c1c 100644 --- a/novawallet/Modules/AssetList/View/AssetListTotalBalanceCell.swift +++ b/novawallet/Modules/AssetList/View/AssetListTotalBalanceCell.swift @@ -162,18 +162,44 @@ final class AssetListTotalBalanceCell: UICollectionViewCell { swapButton.isEnabled = viewModel.hasSwaps } - private func setupStateWithLocks(amount: String) { + func startLoadingIfNeeded() { + guard skeletonView == nil else { + return + } + + amountLabel.alpha = 0.0 + + setupSkeleton() + } + + func stopLoadingIfNeeded() { + guard skeletonView != nil else { + return + } + + skeletonView?.stopSkrulling() + skeletonView?.removeFromSuperview() + skeletonView = nil + + amountLabel.alpha = 1.0 + } +} + +// MARK: Private + +private extension AssetListTotalBalanceCell { + func setupStateWithLocks(amount: String) { locksView.isHidden = false locksView.contentView.detailsView.detailsLabel.text = amount } - private func setupStateWithoutLocks() { + func setupStateWithoutLocks() { locksView.contentView.detailsView.detailsLabel.text = nil locksView.isHidden = true } - private func setupLocalization() { + func setupLocalization() { titleLabel.text = R.string.localizable.walletTotalBalance( preferredLanguages: locale.rLanguages ) @@ -189,7 +215,7 @@ final class AssetListTotalBalanceCell: UICollectionViewCell { ) } - private func setupLayout() { + func setupLayout() { [shadowView1, shadowView2].forEach { view in contentView.addSubview(view) @@ -248,29 +274,7 @@ final class AssetListTotalBalanceCell: UICollectionViewCell { } } - func startLoadingIfNeeded() { - guard skeletonView == nil else { - return - } - - amountLabel.alpha = 0.0 - - setupSkeleton() - } - - func stopLoadingIfNeeded() { - guard skeletonView != nil else { - return - } - - skeletonView?.stopSkrulling() - skeletonView?.removeFromSuperview() - skeletonView = nil - - amountLabel.alpha = 1.0 - } - - private func setupSkeleton() { + func setupSkeleton() { let spaceSize = contentView.frame.size guard spaceSize.width > 0, spaceSize.height > 0 else { @@ -306,7 +310,7 @@ final class AssetListTotalBalanceCell: UICollectionViewCell { currentSkeletonView?.frame = CGRect(origin: .zero, size: spaceSize) } - private func createSkeletons(for spaceSize: CGSize) -> [Skeletonable] { + func createSkeletons(for spaceSize: CGSize) -> [Skeletonable] { let bigRowSize = CGSize(width: 96.0, height: 16.0) let offsetY = Constants.insets.top + titleLabel.font.lineHeight + Constants.amountTitleSpacing + @@ -328,7 +332,7 @@ final class AssetListTotalBalanceCell: UICollectionViewCell { ] } - private func createActionButton(title: String?, icon: UIImage?) -> RoundedButton { + func createActionButton(title: String?, icon: UIImage?) -> RoundedButton { let button = RoundedButton() button.roundedBackgroundView?.fillColor = .clear button.roundedBackgroundView?.highlightedFillColor = .clear diff --git a/novawallet/Modules/AssetsSearch/AssetOperation/AssetOperationNetworkList/AssetOperationNetworkListViewFactory.swift b/novawallet/Modules/AssetsSearch/AssetOperation/AssetOperationNetworkList/AssetOperationNetworkListViewFactory.swift index 2de694909..0c37a9cc8 100644 --- a/novawallet/Modules/AssetsSearch/AssetOperation/AssetOperationNetworkList/AssetOperationNetworkListViewFactory.swift +++ b/novawallet/Modules/AssetsSearch/AssetOperation/AssetOperationNetworkList/AssetOperationNetworkListViewFactory.swift @@ -20,11 +20,13 @@ struct AssetOperationNetworkListViewFactory { ) let presenter = createSendPresenter( - with: interactor, - multichainToken: multichainToken, - stateObservable: stateObservable, - transferCompletion: transferCompletion, - currencyManager: currencyManager + dependencies: SendPresenterDependencies( + interactor: interactor, + multichainToken: multichainToken, + stateObservable: stateObservable, + transferCompletion: transferCompletion, + currencyManager: currencyManager + ) ) let view = AssetOperationNetworkListViewController(presenter: presenter) @@ -36,24 +38,20 @@ struct AssetOperationNetworkListViewFactory { } private static func createSendPresenter( - with interactor: AssetOperationNetworkListInteractor, - multichainToken: MultichainToken, - stateObservable: AssetListModelObservable, - transferCompletion: TransferCompletionClosure?, - currencyManager: CurrencyManager + dependencies: SendPresenterDependencies ) -> SendOperationNetworkListPresenter { - let viewModelFactory = createViewModelFactory(with: currencyManager) + let viewModelFactory = createViewModelFactory(with: dependencies.currencyManager) let wireframe = SendAssetOperationWireframe( - stateObservable: stateObservable, + stateObservable: dependencies.stateObservable, buyTokensClosure: nil, - transferCompletion: transferCompletion + transferCompletion: dependencies.transferCompletion ) return SendOperationNetworkListPresenter( - interactor: interactor, + interactor: dependencies.interactor, wireframe: wireframe, - multichainToken: multichainToken, + multichainToken: dependencies.multichainToken, viewModelFactory: viewModelFactory ) } @@ -100,12 +98,14 @@ extension AssetOperationNetworkListViewFactory { ) let presenter = createBuyPresenter( - with: interactor, - multichainToken: multichainToken, - stateObservable: stateObservable, - selectedAccount: selectedAccount, - purchaseProvider: purchaseProvider, - currencyManager: currencyManager + dependencies: BuyPresenterDependencies( + interactor: interactor, + multichainToken: multichainToken, + stateObservable: stateObservable, + selectedAccount: selectedAccount, + purchaseProvider: purchaseProvider, + currencyManager: currencyManager + ) ) let view = AssetOperationNetworkListViewController(presenter: presenter) @@ -117,24 +117,19 @@ extension AssetOperationNetworkListViewFactory { } private static func createBuyPresenter( - with interactor: AssetOperationNetworkListInteractor, - multichainToken: MultichainToken, - stateObservable: AssetListModelObservable, - selectedAccount: MetaAccountModel, - purchaseProvider: PurchaseProviderProtocol, - currencyManager: CurrencyManager + dependencies: BuyPresenterDependencies ) -> BuyOperationNetworkListPresenter { - let viewModelFactory = createViewModelFactory(with: currencyManager) + let viewModelFactory = createViewModelFactory(with: dependencies.currencyManager) - let wireframe = BuyAssetOperationWireframe(stateObservable: stateObservable) + let wireframe = BuyAssetOperationWireframe(stateObservable: dependencies.stateObservable) return BuyOperationNetworkListPresenter( - interactor: interactor, + interactor: dependencies.interactor, wireframe: wireframe, - multichainToken: multichainToken, + multichainToken: dependencies.multichainToken, viewModelFactory: viewModelFactory, - selectedAccount: selectedAccount, - purchaseProvider: purchaseProvider + selectedAccount: dependencies.selectedAccount, + purchaseProvider: dependencies.purchaseProvider ) } } @@ -160,11 +155,13 @@ extension AssetOperationNetworkListViewFactory { ) let presenter = createReceivePresenter( - with: interactor, - multichainToken: multichainToken, - stateObservable: stateObservable, - selectedAccount: selectedAccount, - currencyManager: currencyManager + dependencies: ReceivePresenterDependencies( + interactor: interactor, + multichainToken: multichainToken, + stateObservable: stateObservable, + selectedAccount: selectedAccount, + currencyManager: currencyManager + ) ) let view = AssetOperationNetworkListViewController(presenter: presenter) @@ -176,22 +173,18 @@ extension AssetOperationNetworkListViewFactory { } private static func createReceivePresenter( - with interactor: AssetOperationNetworkListInteractor, - multichainToken: MultichainToken, - stateObservable: AssetListModelObservable, - selectedAccount: MetaAccountModel, - currencyManager: CurrencyManager + dependencies: ReceivePresenterDependencies ) -> ReceiveOperationNetworkListPresenter { - let viewModelFactory = createViewModelFactory(with: currencyManager) + let viewModelFactory = createViewModelFactory(with: dependencies.currencyManager) - let wireframe = ReceiveAssetOperationWireframe(stateObservable: stateObservable) + let wireframe = ReceiveAssetOperationWireframe(stateObservable: dependencies.stateObservable) return ReceiveOperationNetworkListPresenter( - interactor: interactor, + interactor: dependencies.interactor, wireframe: wireframe, - multichainToken: multichainToken, + multichainToken: dependencies.multichainToken, viewModelFactory: viewModelFactory, - selectedAccount: selectedAccount + selectedAccount: dependencies.selectedAccount ) } } @@ -218,12 +211,14 @@ extension AssetOperationNetworkListViewFactory { ) let presenter = createSwapPresenter( - with: interactor, - multichainToken: multichainToken, - stateObservable: stateObservable, - currencyManager: currencyManager, - selectClosure: selectClosure, - selectClosureStrategy: selectClosureStrategy + dependencies: SwapPresenterDependencies( + interactor: interactor, + multichainToken: multichainToken, + stateObservable: stateObservable, + currencyManager: currencyManager, + selectClosure: selectClosure, + selectClosureStrategy: selectClosureStrategy + ) ) let view = AssetOperationNetworkListViewController(presenter: presenter) @@ -235,24 +230,55 @@ extension AssetOperationNetworkListViewFactory { } private static func createSwapPresenter( - with interactor: AssetOperationNetworkListInteractor, - multichainToken: MultichainToken, - stateObservable: AssetListModelObservable, - currencyManager: CurrencyManager, - selectClosure: @escaping (ChainAsset) -> Void, - selectClosureStrategy: SubmoduleNavigationStrategy + dependencies: SwapPresenterDependencies ) -> SwapOperationNetworkListPresenter { - let viewModelFactory = createViewModelFactory(with: currencyManager) + let viewModelFactory = createViewModelFactory(with: dependencies.currencyManager) - let wireframe = SwapAssetsOperationWireframe(stateObservable: stateObservable) + let wireframe = SwapAssetsOperationWireframe(stateObservable: dependencies.stateObservable) return SwapOperationNetworkListPresenter( - interactor: interactor, + interactor: dependencies.interactor, wireframe: wireframe, - multichainToken: multichainToken, + multichainToken: dependencies.multichainToken, viewModelFactory: viewModelFactory, - selectClosure: selectClosure, - selectClosureStrategy: selectClosureStrategy + selectClosure: dependencies.selectClosure, + selectClosureStrategy: dependencies.selectClosureStrategy ) } } + +private extension AssetOperationNetworkListViewFactory { + struct SendPresenterDependencies { + let interactor: AssetOperationNetworkListInteractor + let multichainToken: MultichainToken + let stateObservable: AssetListModelObservable + let transferCompletion: TransferCompletionClosure? + let currencyManager: CurrencyManager + } + + struct BuyPresenterDependencies { + let interactor: AssetOperationNetworkListInteractor + let multichainToken: MultichainToken + let stateObservable: AssetListModelObservable + let selectedAccount: MetaAccountModel + let purchaseProvider: PurchaseProviderProtocol + let currencyManager: CurrencyManager + } + + struct ReceivePresenterDependencies { + let interactor: AssetOperationNetworkListInteractor + let multichainToken: MultichainToken + let stateObservable: AssetListModelObservable + let selectedAccount: MetaAccountModel + let currencyManager: CurrencyManager + } + + struct SwapPresenterDependencies { + let interactor: AssetOperationNetworkListInteractor + let multichainToken: MultichainToken + let stateObservable: AssetListModelObservable + let currencyManager: CurrencyManager + let selectClosure: (ChainAsset) -> Void + let selectClosureStrategy: SubmoduleNavigationStrategy + } +} diff --git a/novawallet/Modules/NetworkManagement/NetworkDetails/NetworkDetailsPresenter.swift b/novawallet/Modules/NetworkManagement/NetworkDetails/NetworkDetailsPresenter.swift index db20e216d..27812e92b 100644 --- a/novawallet/Modules/NetworkManagement/NetworkDetails/NetworkDetailsPresenter.swift +++ b/novawallet/Modules/NetworkManagement/NetworkDetails/NetworkDetailsPresenter.swift @@ -1,6 +1,9 @@ import SoraFoundation -private typealias ModalActionsContext = (actions: [LocalizableResource], context: ModalPickerClosureContext) +private typealias ModalActionsContext = ( + actions: [LocalizableResource], + context: ModalPickerClosureContext +) final class NetworkDetailsPresenter { weak var view: NetworkDetailsViewProtocol? @@ -366,7 +369,6 @@ extension NetworkDetailsPresenter: ModalPickerViewControllerDelegate { guard let context = context as? ModalPickerClosureContext else { return } - context.process(selectedIndex: index) } } @@ -378,7 +380,6 @@ extension NetworkDetailsPresenter: Localizable { guard let view, view.isSetup else { return } - provideViewModel() } }