Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tech Debt] Removed all ArticleIds #216

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions loafwallet/ArticleIds.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Foundation
enum ArticleIds {
static let nothing = "nothing"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion loafwallet/src/ViewControllers/ReScanViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class RequestAmountViewController: UIViewController {

extension RequestAmountViewController: ModalDisplayable {
var faqArticleId: String? {
return ArticleIds.requestAmount
return ArticleIds.nothing
}

var modalTitle: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ extension ManageWalletViewController: UITextFieldDelegate {

extension ManageWalletViewController: ModalDisplayable {
var faqArticleId: String? {
return ArticleIds.manageWallet
return ArticleIds.nothing
}

var modalTitle: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class ReceiveViewController: UIViewController, Subscriber, Trackable {

extension ReceiveViewController: ModalDisplayable {
var faqArticleId: String? {
return ArticleIds.receiveBitcoin
return ArticleIds.nothing
}

var modalTitle: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion loafwallet/src/Views/DefaultCurrencyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
}
Expand Down
2 changes: 1 addition & 1 deletion loafwallet/src/Views/WalletDisabledView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down