Skip to content

Commit

Permalink
Removed all ArticleIds (#216)
Browse files Browse the repository at this point in the history
Signed-off-by: kcw-grunt <[email protected]>

# Conflicts:
#	loafwallet/ArticleIds.swift
  • Loading branch information
kcw-grunt authored Dec 1, 2023
1 parent 3377025 commit 57e7f59
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
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

0 comments on commit 57e7f59

Please sign in to comment.