Skip to content

Commit

Permalink
wire up new add wallet options. AddAccount WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed May 24, 2024
1 parent bbcb7ef commit f84ed2f
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 95 deletions.
8 changes: 8 additions & 0 deletions Kukai Mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@
C0678DC3272056D400DEF1CB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C0678DC5272056D400DEF1CB /* Localizable.strings */; };
C0678DDB27205FE300DEF1CB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C0678DDD27205FE300DEF1CB /* InfoPlist.strings */; };
C06997F12832946B00F6929D /* UITextView+extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06997F02832946B00F6929D /* UITextView+extensions.swift */; };
C06AEDFD2C00997E005CFDAA /* AddAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06AEDFC2C00997E005CFDAA /* AddAccountViewController.swift */; };
C06AEDFF2C00998D005CFDAA /* AddAccountViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06AEDFE2C00998D005CFDAA /* AddAccountViewModel.swift */; };
C06BC53D2A5EE41B00A0D979 /* SearchResultCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BC53B2A5EE41B00A0D979 /* SearchResultCell.swift */; };
C06BC53E2A5EE41B00A0D979 /* SearchResultCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C06BC53C2A5EE41B00A0D979 /* SearchResultCell.xib */; };
C06BC5412A5EE50E00A0D979 /* SearchResultsCountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BC53F2A5EE50E00A0D979 /* SearchResultsCountCell.swift */; };
Expand Down Expand Up @@ -609,6 +611,8 @@
C0678DD127205AD200DEF1CB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Send.strings; sourceTree = "<group>"; };
C0678DDC27205FE300DEF1CB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C06997F02832946B00F6929D /* UITextView+extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextView+extensions.swift"; sourceTree = "<group>"; };
C06AEDFC2C00997E005CFDAA /* AddAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewController.swift; sourceTree = "<group>"; };
C06AEDFE2C00998D005CFDAA /* AddAccountViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewModel.swift; sourceTree = "<group>"; };
C06BC53B2A5EE41B00A0D979 /* SearchResultCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultCell.swift; sourceTree = "<group>"; };
C06BC53C2A5EE41B00A0D979 /* SearchResultCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchResultCell.xib; sourceTree = "<group>"; };
C06BC53F2A5EE50E00A0D979 /* SearchResultsCountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultsCountCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -912,6 +916,8 @@
C06C529A29FC00C30073A2FE /* RenameWalletGroupdViewController.swift */,
C06C529C29FC09EF0073A2FE /* RemoveWalletViewController.swift */,
C04E0EB32ADE9216001BF56F /* RequiredUpdateViewController.swift */,
C06AEDFC2C00997E005CFDAA /* AddAccountViewController.swift */,
C06AEDFE2C00998D005CFDAA /* AddAccountViewModel.swift */,
);
path = Home;
sourceTree = "<group>";
Expand Down Expand Up @@ -1964,6 +1970,7 @@
C02A4FDA27DA421100F42DE4 /* Date+extensions.swift in Sources */,
C0248CEE2AA21B5900B1F63C /* String+extensions_shared.swift in Sources */,
C003CECD27FDED5D00F64B4C /* CKRecord+extensions.swift in Sources */,
C06AEDFD2C00997E005CFDAA /* AddAccountViewController.swift in Sources */,
C04E2864293F94C500DC4171 /* TokenDetailsBalanceAndBakerCell.swift in Sources */,
C044E1312AAF4CB40085652F /* SideMenuSettingsViewModel.swift in Sources */,
C08FE23A2AD4343500327BF9 /* BackupViewController.swift in Sources */,
Expand Down Expand Up @@ -2082,6 +2089,7 @@
C0C6B5CF28CA27AF00368AEA /* StakeViewController.swift in Sources */,
C03BF88D2A279836003BD343 /* ActivityItemBatchCell.swift in Sources */,
C01372B229B206FF0083E297 /* MenuHeaderCell.swift in Sources */,
C06AEDFF2C00998D005CFDAA /* AddAccountViewModel.swift in Sources */,
C08F6913273ABD7300CCB6E3 /* SwapTokenViewModel.swift in Sources */,
C09860BB27C3E20400F888AF /* EnterAddressComponent.swift in Sources */,
C0E44BAC2A41FDEE00C2A7C0 /* WatchWalletViewController.swift in Sources */,
Expand Down
38 changes: 19 additions & 19 deletions Kukai Mobile/Modules/Account/Account.storyboard

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions Kukai Mobile/Modules/Home/AddAccountViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AddAccountViewController.swift
// Kukai Mobile
//
// Created by Simon Mcloughlin on 24/05/2024.
//

import UIKit

class AddAccountViewController: UIViewController {

@IBOutlet weak var tableView: UITableView!

override func viewDidLoad() {
super.viewDidLoad()
}
}
8 changes: 8 additions & 0 deletions Kukai Mobile/Modules/Home/AddAccountViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// AddAccountViewModel.swift
// Kukai Mobile
//
// Created by Simon Mcloughlin on 24/05/2024.
//

import Foundation
46 changes: 11 additions & 35 deletions Kukai Mobile/Modules/Home/AddWalletViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,41 +93,17 @@ class AddWalletViewController: UIViewController, UITableViewDelegate {
tableView.deselectRow(at: indexPath, animated: true)

if let optionalOption = viewModel.handleTap(atIndexPath: indexPath) {
print("do: \(optionalOption)")
}
}




/*
var bottomSheetMaxHeight: CGFloat = 330
var dimBackground: Bool = true

@IBOutlet var createWalletButton: CustomisableButton!
@IBOutlet var existingWalletButton: CustomisableButton!

override func viewDidLoad() {
super.viewDidLoad()
let _ = self.view.addGradientBackgroundFull()
createWalletButton.customButtonType = .primary
existingWalletButton.customButtonType = .secondary
}

@IBAction func createTapped(_ sender: Any) {
let parent = (self.presentingViewController as? UINavigationController)?.viewControllers.last

self.dismiss(animated: true) {
parent?.performSegue(withIdentifier: "create", sender: nil)
}
}

@IBAction func existingTapped(_ sender: Any) {
let parent = (self.presentingViewController as? UINavigationController)?.viewControllers.last

self.dismiss(animated: true) {
parent?.performSegue(withIdentifier: "existing", sender: nil)
if optionalOption == "hd" {
CreateWalletViewController.createAndCacheHDWallet { errorMessage in
if let error = errorMessage {
self.windowError(withTitle: "error".localized(), description: error)
} else {
self.navigationController?.popViewController(animated: true)
}
}
} else {
self.performSegue(withIdentifier: optionalOption, sender: nil)
}
}
}
*/
}
Loading

0 comments on commit f84ed2f

Please sign in to comment.