From 57e7f596ba44d8ee3a01f4081aaf751b0112d8b6 Mon Sep 17 00:00:00 2001 From: Kerry Washington Date: Thu, 30 Nov 2023 23:06:20 -0500 Subject: [PATCH] Removed all ArticleIds (#216) Signed-off-by: kcw-grunt # Conflicts: # loafwallet/ArticleIds.swift --- loafwallet/ArticleIds.swift | 4 ++++ .../BiometricsSpendingLimitViewController.swift | 2 +- .../src/ViewControllers/EnterPhraseViewController.swift | 4 ++-- loafwallet/src/ViewControllers/ReScanViewController.swift | 2 +- .../src/ViewControllers/RequestAmountViewController.swift | 2 +- .../RootModals/ManageWalletViewController.swift | 2 +- .../ViewControllers/RootModals/ReceiveViewController.swift | 2 +- .../SecurityCenter/SecurityCenterViewController.swift | 2 +- loafwallet/src/Views/DefaultCurrencyViewController.swift | 2 +- loafwallet/src/Views/WalletDisabledView.swift | 2 +- 10 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 loafwallet/ArticleIds.swift diff --git a/loafwallet/ArticleIds.swift b/loafwallet/ArticleIds.swift new file mode 100644 index 000000000..1f4406487 --- /dev/null +++ b/loafwallet/ArticleIds.swift @@ -0,0 +1,4 @@ +import Foundation +enum ArticleIds { + static let nothing = "nothing" +} diff --git a/loafwallet/src/ViewControllers/BiometricsSpendingLimitViewController.swift b/loafwallet/src/ViewControllers/BiometricsSpendingLimitViewController.swift index 81f9c878e..0866069c2 100644 --- a/loafwallet/src/ViewControllers/BiometricsSpendingLimitViewController.swift +++ b/loafwallet/src/ViewControllers/BiometricsSpendingLimitViewController.swift @@ -33,7 +33,7 @@ class BiometricsSpendingLimitViewController: UITableViewController, Subscriber { titleLabel.sizeToFit() navigationItem.titleView = titleLabel - let faqButton = UIButton.buildFaqButton(store: store, articleId: ArticleIds.touchIdSpendingLimit) + let faqButton = UIButton.buildFaqButton(store: store, articleId: ArticleIds.nothing) faqButton.tintColor = .darkText navigationItem.rightBarButtonItems = [UIBarButtonItem.negativePadding, UIBarButtonItem(customView: faqButton)] diff --git a/loafwallet/src/ViewControllers/EnterPhraseViewController.swift b/loafwallet/src/ViewControllers/EnterPhraseViewController.swift index 121c1d54b..886b314e0 100644 --- a/loafwallet/src/ViewControllers/EnterPhraseViewController.swift +++ b/loafwallet/src/ViewControllers/EnterPhraseViewController.swift @@ -14,7 +14,7 @@ class EnterPhraseViewController: UIViewController, UIScrollViewDelegate, CustomT self.store = store self.walletManager = walletManager enterPhrase = EnterPhraseCollectionViewController(walletManager: walletManager) - faq = UIButton.buildFaqButton(store: store, articleId: ArticleIds.recoverWallet) + faq = UIButton.buildFaqButton(store: store, articleId: ArticleIds.nothing) self.reason = reason switch reason { @@ -145,7 +145,7 @@ class EnterPhraseViewController: UIViewController, UIScrollViewDelegate, CustomT instruction.isHidden = true moreInfoButton.setTitle(S.RecoverWallet.resetPinInfo.localize(), for: .normal) moreInfoButton.tap = { [weak self] in - self?.store.trigger(name: .presentFaq(ArticleIds.resetPinWithPaperKey)) + self?.store.trigger(name: .presentFaq(ArticleIds.nothing)) } faq.isHidden = true case .validateForWipingWallet: diff --git a/loafwallet/src/ViewControllers/ReScanViewController.swift b/loafwallet/src/ViewControllers/ReScanViewController.swift index 409e400ac..7e343f44a 100644 --- a/loafwallet/src/ViewControllers/ReScanViewController.swift +++ b/loafwallet/src/ViewControllers/ReScanViewController.swift @@ -3,7 +3,7 @@ import UIKit class ReScanViewController: UIViewController, Subscriber { init(store: Store) { self.store = store - faq = .buildFaqButton(store: store, articleId: ArticleIds.reScan) + faq = .buildFaqButton(store: store, articleId: ArticleIds.nothing) super.init(nibName: nil, bundle: nil) } diff --git a/loafwallet/src/ViewControllers/RequestAmountViewController.swift b/loafwallet/src/ViewControllers/RequestAmountViewController.swift index 61b1b8c9e..f4e5f64ab 100644 --- a/loafwallet/src/ViewControllers/RequestAmountViewController.swift +++ b/loafwallet/src/ViewControllers/RequestAmountViewController.swift @@ -238,7 +238,7 @@ class RequestAmountViewController: UIViewController { extension RequestAmountViewController: ModalDisplayable { var faqArticleId: String? { - return ArticleIds.requestAmount + return ArticleIds.nothing } var modalTitle: String { diff --git a/loafwallet/src/ViewControllers/RootModals/ManageWalletViewController.swift b/loafwallet/src/ViewControllers/RootModals/ManageWalletViewController.swift index 0b5ac17de..94c2e55bf 100644 --- a/loafwallet/src/ViewControllers/RootModals/ManageWalletViewController.swift +++ b/loafwallet/src/ViewControllers/RootModals/ManageWalletViewController.swift @@ -138,7 +138,7 @@ extension ManageWalletViewController: UITextFieldDelegate { extension ManageWalletViewController: ModalDisplayable { var faqArticleId: String? { - return ArticleIds.manageWallet + return ArticleIds.nothing } var modalTitle: String { diff --git a/loafwallet/src/ViewControllers/RootModals/ReceiveViewController.swift b/loafwallet/src/ViewControllers/RootModals/ReceiveViewController.swift index e167f9791..e87d54232 100644 --- a/loafwallet/src/ViewControllers/RootModals/ReceiveViewController.swift +++ b/loafwallet/src/ViewControllers/RootModals/ReceiveViewController.swift @@ -273,7 +273,7 @@ class ReceiveViewController: UIViewController, Subscriber, Trackable { extension ReceiveViewController: ModalDisplayable { var faqArticleId: String? { - return ArticleIds.receiveBitcoin + return ArticleIds.nothing } var modalTitle: String { diff --git a/loafwallet/src/ViewControllers/SecurityCenter/SecurityCenterViewController.swift b/loafwallet/src/ViewControllers/SecurityCenter/SecurityCenterViewController.swift index 230299bae..acb4809da 100644 --- a/loafwallet/src/ViewControllers/SecurityCenter/SecurityCenterViewController.swift +++ b/loafwallet/src/ViewControllers/SecurityCenter/SecurityCenterViewController.swift @@ -25,7 +25,7 @@ class SecurityCenterViewController: UIViewController, Subscriber { init(store: Store, walletManager: WalletManager) { self.store = store self.walletManager = walletManager - header = ModalHeaderView(title: S.SecurityCenter.title.localize(), style: .light, faqInfo: (store, ArticleIds.securityCenter)) + header = ModalHeaderView(title: S.SecurityCenter.title.localize(), style: .light, faqInfo: (store, ArticleIds.nothing)) if #available(iOS 11.0, *) { shield.tintColor = UIColor(named: "labelTextColor") diff --git a/loafwallet/src/Views/DefaultCurrencyViewController.swift b/loafwallet/src/Views/DefaultCurrencyViewController.swift index 7c1c0ef85..f81dc40d1 100644 --- a/loafwallet/src/Views/DefaultCurrencyViewController.swift +++ b/loafwallet/src/Views/DefaultCurrencyViewController.swift @@ -59,7 +59,7 @@ class DefaultCurrencyViewController: UITableViewController, Subscriber { titleLabel.sizeToFit() navigationItem.titleView = titleLabel - let faqButton = UIButton.buildFaqButton(store: store, articleId: ArticleIds.displayCurrency) + let faqButton = UIButton.buildFaqButton(store: store, articleId: ArticleIds.nothing) faqButton.tintColor = .darkText navigationItem.rightBarButtonItems = [UIBarButtonItem.negativePadding, UIBarButtonItem(customView: faqButton)] } diff --git a/loafwallet/src/Views/WalletDisabledView.swift b/loafwallet/src/Views/WalletDisabledView.swift index fceffe593..4a2304c42 100644 --- a/loafwallet/src/Views/WalletDisabledView.swift +++ b/loafwallet/src/Views/WalletDisabledView.swift @@ -7,7 +7,7 @@ class WalletDisabledView: UIView { init(store: Store) { self.store = store - faq = UIButton.buildFaqButton(store: store, articleId: ArticleIds.walletDisabled) + faq = UIButton.buildFaqButton(store: store, articleId: ArticleIds.nothing) blur = UIVisualEffectView() super.init(frame: .zero) setup()